Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Oracle Miscellaneous > Re: How to avoi...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 4 Topic 6869 of 7280
Post > Topic >>

Re: How to avoid PLS-00413 when using cursorType

by Maxim Demenko <mdemenko@[EMAIL PROTECTED] > Apr 30, 2008 at 08:34 PM

Martin schrieb:
> Hi,
> 
> I have the following cut down pls/sql:
> 
> cur_entries cursorType;
> 
> IF condition
>    open cur_entries for
>      SELECT a from test_table1 for update of b;
> ELSE
>    open cur_entries for
>      SELECT a from test_table2 for update of b;
> END IF;
> 
> LOOP
>   FETCH cur_entries INTO var;
>   EXIT WHEN cur_entries%NOTFOUND;
> 
>   IF condition
>     -- a lot of pl/sql here
>     update test_table1 set b = 1 where current of cur_entries;
>   ELSE
>     -- a lot of pl/sql here
>     update test_table2 set b = 1 where current of cur_entries;
>   END IF;
> END LOOP;
> and I am getting "PLS-00413: identifier in CURRENT OF clause is not a
> cursor name".
> 
> I don't quite understand this as I thought "cur_entries" was a cursor
> but I guess as it is defined as cursorType Oracle does not like it. Is
> there any way for me to avoid this without replicating all the code
> with two explicitly named cursors? All the code in the procedure is
> identical for both cursors other than the fetch and update.
> 
> Thanks.

The "current of"  clause does apply only to cursors, not to cursor 
varibales which you are using.

Best regards

Maxim
 




 4 Posts in Topic:
How to avoid PLS-00413 when using cursorType
Martin <martin.j.evans  2008-04-30 09:05:20 
Re: How to avoid PLS-00413 when using cursorType
Maxim Demenko <mdemenk  2008-04-30 20:34:52 
Re: How to avoid PLS-00413 when using cursorType
Martin <martin.j.evans  2008-04-30 12:46:54 
Re: How to avoid PLS-00413 when using cursorType
sybrandb@[EMAIL PROTECTED  2008-04-30 22:49:56 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed Dec 3 0:07:43 CST 2008.