Hello,
I need to retreive the last 25 rows of a log table that does not have an index and do it using one SQL command.
I can get the first 25 using this:
I tried getting the last 25 using this SELECT text FROM scott.alert_log WHERE rownum > max(rownum)-25; but get the error:
What can you recommend?
Thanks,
JT
I need to retreive the last 25 rows of a log table that does not have an index and do it using one SQL command.
I can get the first 25 using this:
Code:
SELECT text FROM scott.alert_log WHERE rownum < 25
I tried getting the last 25 using this SELECT text FROM scott.alert_log WHERE rownum > max(rownum)-25; but get the error:
Code:
SELECT text FROM scott.alert_log WHERE rownum > max(rownum)-25
*
ERROR at line 1:
ORA-00934: group function is not allowed here
What can you recommend?
Thanks,
JT