-
Hi there,
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
TONNERA
TONNERA
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
FROM PS_CB_EXCEPT_CTL
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
Allie
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|