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
Is it possible to create an Instance in DB2 using DB2 Control Center ?
When do you specify the isolation level?
What is rebind in db2?
Explain dclgen.
Explain the contents that are a part of dclgen.
Hello All, We have requirment to Replace BMC Db2 Load product thru CA FAST LOADPlus product. Do anyone have JCL to for FAST LOADPLUS and what all are thing need to take in consideration.
What is the picture clause of null indicator variable?
How can you count the number of rows from a table tab?
How does cobol compile db2 program?
What is the reason behind not using select * in embedded sql programs?
How to retrieve rows from a db2 table in embedded sql?
My sql statement select avg(salary) from emp yields inaccurate results. Why?
What is explain in db2?
How to find the number of rows in a db2 table?
What are the 2 sqlcodes that are returned?