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?
Submitted by: Administratorwhen 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;
Submitted by: Administrator
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;
Submitted by: Administrator
Read Online IBM DB2 Job Interview Questions And Answers
Top IBM DB2 Questions
☺ | what are the bind parameters IBM DB2? |
☺ | What is sqlcode -811? |
☺ | What is sqlcode -922 ? |
☺ | Cursors can be declared in both working-storage & procedure |
☺ | Can you have more than one cursor open at any one time in a program ? |
Top Databases Programming Categories
☺ | RDBMS Interview Questions. |
☺ | SQL Interview Questions. |
☺ | SSRS Interview Questions. |
☺ | Database Administrator (DBA) Interview Questions. |
☺ | Sybase Interview Questions. |