-811 abend

When will occur -811 abend? how will u resolve the -811 abend?

Questions by rpg0247   answers by rpg0247

Showing Answers 1 - 17 of 17 Answers

Sneha

  • Jul 14th, 2011
 

Sql code -811 will occur when more than 1 row is returned for a single SQL statement.

To resolve this you can use the concept of cursor in DB2.

chandu

  • Jul 14th, 2011
 

THE RESULT OF AN EMBEDDED SELECT STATEMENT IS A TABLE OF MORE THAN ONE ROW, OR THE RESULT OF THE SUBQUERY OF A BASIC PREDICATE IS MORE THAN ONE VALUE.
Explanation :: Execution of an embedded SELECT statement has resulted in a result table containing more than one row. Alternatively, a sub query contained in a basic predicate has produced more than one value.

BrantleyL1

  • Jul 27th, 2011
 

Yes, this is returned when you do a select and the result is more than one row...

But what to do??

If your table needs to allow for more than one row with the select values in use, you WILL need to use a cursor.

Otherwise, if it does not, you will need to add code (probably in another program) to prevent the duplicates. And remove the duplicates from the table.

Veerandhra

  • Sep 16th, 2011
 

Fetching more than one row from a table then -811 abend code will occurs,best resolution is to use cursors concept.

6983manish

  • Nov 12th, 2011
 

If the need is to get any of the row qualified for the predicates given , you can use "Fetch First 1 Row Only" with your select query.

OR

If you are interested all the data qualified for the query , there is no option except the use of Cursors.

rasheeed17

  • Jan 19th, 2012
 

- You will get -811 abend when your SQL query returns more than one record.

- COBOL do not have ability to handle more than one db2 record at a time.

- You must USE CURSOR If your query returns more than 1 record. Cursor will hold all the records in it & you can use Cobol to one by one record from cursor and process them

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions