I'm looking for some help on the following SQL query.
I have a table with the following data in it.
OPRID DATE_FROM DATE_TO
-------- --------- ---------
DOBELLA 01-JUL-01 31-AUG-01
MILLARL 01-JUN-00 31-DEC-01
I want to extract information from the date_from & date_to fields, but I only want to see the last values where it's not null.
i.e. I want 01-JUN-00 31-DEC-01
I tried using
SELECT OPRID, DATE_FROM, DATE_TO, ROWNUM
WHERE ROWID=(SELECT MAX(ROWID) FROM PS_CB_EXCEPT_CTL)
AND DATE_FROM IS NOT NULL;
This obviously give me nothing but I can't think of another way of doing it.
These values will be used in an SQR program.
I am running Oracle7.3.3.
Many thanks in Advance