when we are tying to update a table having 100 rows. if the
program abends when updating 51 row . how to start updating
again from the 51 row .what was the logic
Answer Posted / abhijit18in2002
when we are tying to update a table having 100 rows.
if the program abends when updating 51 row . how to start
updating again from the 51 row .
what was the logic
Ans: The Possible answer would be..if you had used COMMIT
before 51st ROW .. the Former records
would have been updated in the table .. If No COMMIt was
used.. The whole transaction would have been
ROLLBACKED.
Now If you want to start a fresh Transaction and want to
start Updating directly from 51st Row
Then There are two ways
1> Perform a loop to scroll till u have read 50 rows
Then Point ur cursor as CURRENT to the 51st Row
Start Updating the Records Till end of table.
or
2> Declare a Scrollable cursor & use FETCH ABSOLUTE option
to fetch a particular row directly
EXEC SQL FETCH ABSOLUTE +51 C1
INTO :TEMP1, :TEMP2, :TEMP3;
this statement fetches the 51st row of the Table
Is This Answer Correct ? | 8 Yes | 5 No |
Post New Answer View All Answers
What are the two types of logging in the db2 database? Explain them.
How do I connect my db2 database to ibm?
What is db2 catalog database?
What is a storage group (stogroup)?
what is a corelated subquerry?
What does db2 blu stand for?
What is the physical storage length of the data types: date, time, timestamp in the db2 database?
How to connect to db2 database from windows command line?
Differentiate between cs and rr isolation levels? Where do you specify them?
How do you eliminate duplicate values in db2?
i tried to copy some records from microsoft excel to as-400 physical file through "Bosanova" emulation. Out of 14000 records only 12000 records copies and subsequently programe started to hang. Then, i closed the program forcefully. I did' under stand the problem. Also when i try to compile the physical file it is showing as "The file in use". How to overcome this problem?
What parameters are used to control the free space in DB2?
What is dclgen (declaration generator)?
What is dbrm?
What is load utility in db2?