Posted: Thu Oct 02, 2003 9:06 am Post subject: No. of Records updated thru library
Hi Friends,
I really find this site to be very useful.
I have learnt a lot! from this site and got most of the solutions.
I have one update statment inside the fetch which might have some records(for each fetch) at a time(may be 2000,10000 or so for single fetch depending on the data and updates the table.
Is there any library where I can see how many records has actually been updated.
If I put the count in the fetch or successful update I can get no of fetch or
I can see the select statement for that particular update condition and get the count, but is there any Library thing where I can see direcly how much records are updated.
I got to know that we can see this information.
Please let me know the details for seeing it.
Thanks in advance _________________ Have a Great Day.
Thanks & Regards,
Jai
Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
Posted: Thu Oct 02, 2003 11:19 am Post subject:
Jai,
The SQLERRD(3) in SQLCA will contain the number of rows affected after INSERT, UPDATE, and DELETE (but not rows deleted as a result of CASCADE delete). It is Set to 0 if the SQL statement fails, indicating that all changes made in executing the statement were canceled. It is set to to -1 for a mass delete from a table in a segmented table space. For SQLCODES -911 and -913, SQLERRD(3) contains the reason code for the timeout or deadlock
Hope this helps...
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum