What error I will get if my select query gives multiple
row while executing a Cobol-DB2 program.How can I solve it
without using a cursor.
Answer Posted / nitin sharma
Hi,
You will get -811 SQLCODE if more than one rows will be
returned by your query.
To avoid this you can also use FETCH FIRST 1 ROWS ONLY in
your query like
SELECT * FROM EMP
FETCH FIRST 1 ROWS ONLY;
Hope this helps.
Nitin
| Is This Answer Correct ? | 11 Yes | 0 No |
Post New Answer View All Answers
Which components manage deadlocks in db2?
Can there be more than one cursor open for any program?
When the like statement is used?
What is bind in db2?
How connect db2 database to datastage?
What is the use of runstats in db2?
What is syscat in db2?
what is the sqlcode -501
How to rename a table in DB2 ?
What are the various isolation levels possible?
What is difference between alias and synonym in db2?
How do I optimize a query in db2?
Mention the definition of cobol in varchar field.
What is commit in db2?
How to view db2 table structure?