Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: How To Trap No Rows Returned From Select Statement
"Tony" <andrewst_at_onetel.net.uk> wrote in message
news:c0e3f26e.0407060409.75c16a93_at_posting.google.com...
| chrisval_at_bigpond.com.au (Chris Val) wrote in message
news:<118880b0.0407051747.1e9cbdb7_at_posting.google.com>...
| > Hi all.
| >
| > I am having trouble working out how to trap whether
| > my select statement returned any rows - This seems
| > to be more difficult with implicit cursors, and I
| > been able to figure it out :-).
[snip]
Hi Tony.
| > Why does SQL%NOTFOUND not return true ?, and how do I fix it ?
| >
| > Any help appreciated.
| >
| > Thanks.
| > Chris Val
|
| SQL%NOTFOUND doesn't work because you have not performed any SQL at
| that point in the program. You can do this:
Thanks for the alternative - I realise where I went wrong now.
| (I took the liberty of adding a useful ORDER BY clause to the query).
I must admit that I didn't even think about it, presumably because I thought that the lines would be ordered by default anyway.
Is this not the case ?
Cheers.
Chris Val
Received on Wed Jul 07 2004 - 02:28:33 CDT
![]() |
![]() |