tiffianypeck
04-19-2006, 05:19 PM
hello,
i have about 4 date fields in my table.
col1
col2
col3
col4
i need to get the latest date of the four fields.
as new_col
for example.
select column_id
then find the later of the four columns with the date field values.
so for id 11 it could be col2
id2 it is column 4 and so on.
how ca i do this in oracle.
i dont know about the greatest function.
i looked into it but my work did not compile.
thanks in adv
i have about 4 date fields in my table.
col1
col2
col3
col4
i need to get the latest date of the four fields.
as new_col
for example.
select column_id
then find the later of the four columns with the date field values.
so for id 11 it could be col2
id2 it is column 4 and so on.
how ca i do this in oracle.
i dont know about the greatest function.
i looked into it but my work did not compile.
thanks in adv