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 |
What is rebind in db2?
Comment whether dclgen is mandatorily used. If not, then what is the point of using it?
What is the difference between plan and package in db2?
One program calling 5 subprograms, its a cobol db2 program, after precompilation how many plans and packages will created?
What is alias in db2?
How to define the data items to receive the fetch items for the SQL?
How to design maps
What is db2 look?
What are the various data types available in db2?
what is SMP/E? and what are the major steps of it? thanks...
How can you find out which query is taking lot of time to execute in cobol-db2 program ?
Request to database but database is not available so what is was abend is raised?