I need help with an update statement.
UPDATE mrgrpdm
SET quantity_required = stfcedits.quantity_required
FROM mrgrpdm a, stfcedits b
WHERE b.product = a.product and
b.forecast_reference = a.forecast_reference
the stfcedits table has an entry_date column and there can be multiple
entry_dates per product and forecast_reference combination. I want to be able to only update with the max(entry_date) row for that combination. Can anyone suggest the syntax. I am using SQL Server 7.0.
Thanks,
Darren
UPDATE mrgrpdm
SET quantity_required = stfcedits.quantity_required
FROM mrgrpdm a, stfcedits b
WHERE b.product = a.product and
b.forecast_reference = a.forecast_reference
the stfcedits table has an entry_date column and there can be multiple
entry_dates per product and forecast_reference combination. I want to be able to only update with the max(entry_date) row for that combination. Can anyone suggest the syntax. I am using SQL Server 7.0.
Thanks,
Darren