Can you provide all of the code for us to review ???
Cognito, Ergo, Sum
"Insanity is defined as doing the same thing over and over again in the
same way, and expecting a different result" -
Albert Einstein
---------.oooO (__) Oooo. ---------------------------
"Praveen Chengalathu "
<db2udbdba-ezmlmshield-x45220054.[Email address protected]
05/30/2006 09:00 AM
To
"LazyDBA Discussion" <[Email address protected]
cc
Subject
Positioned Delete in a Stored Procedure
Hi..
I am trying to do a positioned update within an SQL stored procedure as
below( DB2 V7.2 on AIX)
1. Declare C1 cursor for update of columns fetch first 1000 rows only on
commit preserve rows
2. -- Outer Loop till no more records to update
Open C1
-- Inner Loop till 1000 records are fetched and updated
Fetch C1
Update T1 set columns where current of c1
-- End Inner Loop
commit;
Close C1;
-- End Outer Loop
I am trying to implement the above algo to ensure that the update is
commited every 1000 records to release the locks.
The positioned update doesn't seem to work in a stored procedure though
the SP compiles successfully.
Anyone else noticed this or am I missing something here ?
Thanks
Praveen
---------------------------------------------------------------------
PLEASE CLICK REPLY-ALL TO SEND A REPLY TO EVERYONE
website: http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html
-----------------------------------------
This e-mail and any attachments are intended only for the
individual or company to which it is addressed and may contain
information which is privileged, confidential and prohibited from
disclosure or unauthorized use under applicable law. If you are
not the intended recipient of this e-mail, you are hereby notified
that any use, dissemination, or copying of this e-mail or the
information contained in this e-mail is strictly prohibited by the
sender. If you have received this transmission in error, please
return the material received to the sender and delete all copies
from your system.
DB2 & UDB email list listserv db2-l LazyDBA home page