Re: WHERE CURRENT OF and dynamic SQL
From: Jonathan Lewis <jonathan_at_jlcomp.demon.co.uk>
Date: 1999/12/08
Message-ID: <944682603.17585.1.nnrp-12.9e984b29_at_news.demon.co.uk>#1/1
Date: 1999/12/08
Message-ID: <944682603.17585.1.nnrp-12.9e984b29_at_news.demon.co.uk>#1/1
Surely that should read:
you can't use CURRENT OF unless
you've done FOR UPDATE OF.
You should be table to do the FOR UPDATE and lock the rows from dynamic SQL.
I presume this is Oracle 7, and you are thinking of dbms_sql, because there are probably better ways of doing what you want in 8.1.
-- Jonathan Lewis Yet another Oracle-related web site: http://www.jlcomp.demon.co.uk Scott D. DeWitt wrote in message <384EA60E.C36059A2_at_us.ibm.com>...Received on Wed Dec 08 1999 - 00:00:00 CET
>All:
>
>I just read that you cannot use the CURRENT OF clause when using dynamic
>SQL. Also, the documentation says you cannot have a FOR UPDATE OF
>without a CURRENT OF, so I assume that neither of these clauses can be
>used when doing dynamic SQL. This means that we are not able to open a
>cursor for update of some columns in the select statement, scan through
>each, modify and replace them using the CURRENT OF in dynamic SQL. Is
>there some other dynamic SQL to support this process? I can't imagine
>that there is no support for this as it seems an awfully common thing to
>do. I have thought about implementing my own sort of cursor, which
>doesn't seem terribly hard. However, if you leave off the FOR UPDATE,
>then the rows don't get locked.
>
>Anyone know of a way to do this type of procedure using dynamic SQL?
>
>Thanks in advance,
>Scott DeWitt
>