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

How to check sequence on a table in db2?

1010


What is the clustering index in the db2 database?

962


In an sql table that is embedded, what is the procedure to retrieve rows that are part of a db2 table?

1056


define clustering index.

986


What is the use of reorg in db2?

1030


What does sqlcabc has?

1006


List down the types of triggers in the db2 database?

975


What is the syntax for FETCH in DB2 ?

1152


What is the physical storage length of date data type?

1197


What are the different types of base tables?

1036


How will you return the number of records in table?

886


DB2 can implement a join in three ways using a merge join, a nested join or a hybrid join. Explain the differences?

2792


How do you eliminate duplicate values in db2?

1116


Define declaration generator (dclgen).

1072


What is commit in db2?

1002