![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Good morning. I have a table with a date column. I want to find the next latest date in the data in that table. I have got this far: SELECT SNAPSHOT_DATE, ROWNUM FROM (SELECT DISTINCT SNAPSHOT_DATE FROM MONTHLY_SNAPSHOTS ORDER BY SNAPSHOT_DATE DESC ) WHERE ROWNUM > 0 which returns all the dates in the table. If I change the where clause to WHERE ROWNUM = 1 I just get the most recent date. But if I change the where clause to WHERE ROWNUM = 2 I get an empty recordset. I seem to be missing something. |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |