pjohns
15th February 2002, 12:47
My DBA is not here today and I need to populate a date column in a table using another date column - 3.

E.G. Date A = (Date B - 3)

Can somebody please help with the appropiate query.

Thanks

PJ

patvdv
15th February 2002, 17:04
PJ,

Never give your DBA a holiday unless he has a backup :)

This could do the trick:

UPDATE table
SET date_a = (date_b - 3);

This is a very generic SQL statement that will work in an Oracle database and when both columns are in the same table and without WHERE delimiter. Check the update before you do a commit :)