Can you use a select query in a loop to fetch multiple rows?
If so what is the advantage of using a cursor?
Answers were Sorted based on User's Feedback
No. In cobol-db2 program, the result of single select should be only one row.
For multi row fetch we must use cursor, else program will abend with -811 sql code.
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / satheesh reddi
no...for that we are using cursors. due to cursors we can retrieve or fetch number of rows at a time from the table
| Is This Answer Correct ? | 0 Yes | 0 No |
How to resolve -917 sql code in DB2?
Can we declare cursor in Procudere division or open the cursor in the Working storage section. Is there any particular rules in the usage of cursors lifecycle
Define predicate?
What is the advantage in De-normalizing tables in DB2?
Can we use select query in a loop to fetch multiple rows in a COBOL PROGRAM? If so, what is the advantage of cursor?
What is node in db2?
Hi Team, Please tell me, If i don't declare the cursor in the program and i have given open and fetch and close, then what error will get.
What is the use of reorg in db2?
What is package in db2 mainframe?
What are the various isolation levels possible?
Mention the different locking levels that are available in db2.
have 3 tables table1, table2 and table3 which contains employee information. table1 is master table, table2 contains emp details like emp no and so on, table 3 contains emp salary. so if any emp leave company between 25th - 30th of every month it has to get updated in tables. but it is not getting updated. What is the reason.