Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> sql plus max function query
Max function query
select max(start_date)
from accounts
where ........etc....
If there are no rows to satisfy the above query sql plus does not say 'No Rows Selected'.
If I ran the above query without the max function 'No Rows Selected' is displayed.
The problem is that if the above query is set up in a cursor then %notfound would not work, therefore processing would continue without testing whether any rows have been found.
I know that putting NVL(max(start_date,sysdate)) would work, but can anybody tell me why the max function works differently.
Thanks in anticipation,
SDG -----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Mon Feb 01 1999 - 03:35:04 CST