Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Determining number of rows returned by a cursor

Determining number of rows returned by a cursor

From: <rickowen_at_my-deja.com>
Date: Thu, 26 Aug 1999 23:16:35 GMT
Message-ID: <7q4hsb$eqb$1@nnrp1.deja.com>


I am writing some procedure in pl/sql. Assuming I have a cursor such as:

cursor mycursor (mysearch in varchar2) is

   select name, id
   from employee
   where upper(name) like '%' || upper(mysearch) || '%'

is there any way to determine the number of rows returned by such a cursor so that I could do something like:

if mycursor%RECORDCOUNT then

I know about %ROWCOUNT, but I would like to know before I actually execute the cursor whether or not it will return rows.

Thanks.

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't. Received on Thu Aug 26 1999 - 18:16:35 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US