Home » SQL & PL/SQL » SQL & PL/SQL » Comparing cursor with null (Oracle 9i)
Comparing cursor with null [message #331466] Thu, 03 July 2008 08:53 Go to next message
me_arindam
Messages: 26
Registered: March 2008
Location: India
Junior Member
Hi,

I have a cursor like,

cuesor c1 is select * from emp;
and a variable like,
v emp%rowtype;

Now I want to see whether the cursor is null or not?

I have tried with if c1 is null--> got error

I have tried after opening and fetching the cursor into v,

if v is null then---> also got error.

Please tell me how can I compare the cursor with null value?


Thanks,
Arindam
Re: Comparing cursor with null [message #331467 is a reply to message #331466] Thu, 03 July 2008 08:55 Go to previous messageGo to next message
BlackSwan
Messages: 25046
Registered: January 2009
Location: SoCal
Senior Member
Please read & follow Posting Guidelines below
http://www.orafaq.com/forum/t/88153/0/

Re: Comparing cursor with null [message #331469 is a reply to message #331466] Thu, 03 July 2008 08:59 Go to previous messageGo to next message
S.Rajaram
Messages: 1027
Registered: October 2006
Location: United Kingdom
Senior Member
Could you please explain in plain english words what you are trying to do ?

Regards

Raj
Re: Comparing cursor with null [message #331470 is a reply to message #331466] Thu, 03 July 2008 09:07 Go to previous messageGo to next message
BlackSwan
Messages: 25046
Registered: January 2009
Location: SoCal
Senior Member
>Now I want to see whether the cursor is null or not?

What exactly is a "null cursor"?

What is the significance of a "null cursor"?
Re: Comparing cursor with null [message #331473 is a reply to message #331466] Thu, 03 July 2008 09:11 Go to previous message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
A cursor cannot be null - a cursor is a thing that you fetch data f
from.
You cannot know the number of rows that a cursor will return until you've fetched the last row (unless you include some sort of COUNT function as one of the columns - not recommended).

Previous Topic: Granting privelege only to execute dbms_aqadm.createqueue
Next Topic: commit interval after delete
Goto Forum:
  


Current Time: Thu Dec 08 03:59:19 CST 2016

Total time taken to generate the page: 0.06414 seconds