Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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 bufferpool in db2?

1095


How do I delete a column in db2?

1152


What are the uses of db2 optimizer?

1350


What action db2 takes when a program aborts in the middle of a transaction?

1192


Cursors can be declared in both working-storage & procedure division, agreed. But is there any difference? If could you please suggest what is the difference

1531


How to find the number of rows in db2 tables?

1125


Mention the various locks that are available in db2.

1080


Why do we bind in db2?

1272


What do you mean by cursor?

1029


Why select is not preferred in embedded sql programs?

1346


Is it possible using max on a char column?

1191


Are views updateable?

1234


Which command is used to remove all rows from a table?

1176


What is a db2 schema?

1296


What is the physical storage length of the data types: date, time, timestamp in the db2 database?

1212