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
Can we delete records from view?
What is netezza database?
Hello All, We have requirment to Replace BMC Db2 Load product thru CA FAST LOADPlus product. Do anyone have JCL to for FAST LOADPLUS and what all are thing need to take in consideration.
What is database alias db2?
What is explain plan in db2?
Discuss about db2 bind?
How do you concatenate the firstname and lastname from emp table to give a complete name?
What is the syntax for FETCH in DB2 ?
What are iseries servers?
What is host variable in db2 cobol?
is it compulsory commitment control in journal?
What is temporal table in db2?
Is db2 relational database?
How can you validate Sql errors during cursor operation in db2 pgms and where do you code?
What is a db2 cursor?