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


Please Help Members By Posting Answers For Below Questions

What is buffer pool in the db2 database?

864


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.

2539


What are the various isolation levels possible?

877


Explain about rct in db2?

881


What is consistency token in db2?

884


What is null indicator in db2?

871


How do I import a csv file into db2?

771


Which components manage deadlocks in db2?

829


How to check table size in db2 sap?

799


How many databases can be created inside an instance in db2 ?

826


What is runstats db2?

788


What is the use of dclgen in db2?

819


What is the physical storage length of the data types date, time, and timestamp?

881


What are bind parameters in db2?

823


For a db2 column that is being defined as decimal (11, 2), discuss the cobol picture clause.

882