Re: How to check if a cursor has results?
Date: Thu, 11 Apr 2002 02:40:48 GMT
Message-ID: <3CB4F6DD.D46E5612_at_shaw.ca>
try %NOTFOUND with SELECTS to see if they returned data or not:
http://asktom.oracle.com/pls/ask/f?p=4950:8:679886::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:96612348060,%7B%25NOTFOUND%7D http://asktom.oracle.com/pls/ask/f?p=4950:8:679886::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:461253107955,%7B%25NOTFOUND%7D
"D. Alvarado" wrote:
>
> I apologize in advance for this novice question.
>
> I am using Oracle 8 and I was wondering the PL/SQL syntax for checking
> if a cursor retrieved anything or not. So, given my statement
>
> OPEN p_cursor FOR select_stmt
> IF (p_cursor has results) THEN
> ...
> ELSE
> ...
> END IF
>
> what should I put for "p_cursor ahs results"?
>
> Thanks, Dave A.
Received on Thu Apr 11 2002 - 04:40:48 CEST