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
Where can you declare a cursor in a cobol-db2 program?
Which isolation level provides highest data integrity?
Explain about cursor stability?
My sql statement select avg(salary) from emp yields inaccurate results. Why?
How to rename a table in DB2 ?
List down the types of triggers in the db2 database?
What is reorg and runstats in db2?
For a db2 column that is being defined as decimal (11, 2), discuss the cobol picture clause.
is it compulsory commitment control in journal?
What is package in db2 mainframe?
What is the difference between drop table and delete table?
When a COBOL-DB2 program in PRODUCTION is updating main tables and gone for long run, what have to do?
What is the purpose of using commit?
Mention the location where the output received from explain statement is stored.
When the like statement is used?