Db2 Sql Error 811
Contents |
MainFrame >> DB2 Suggest New Category What is sqlcode -811? Question Posted / guest 7 Answers 43467 Views CTS, TCS, I also Faced E-Mail Answers Answers were Sorted based on User's Feedback how to solve sqlcode 811 Answer / jdriley Is the SQLCODE returned when your singleton select statement returns/retrieves more db2 sqlcode -811 than one row of data. Is This Answer Correct ? 63 Yes 7 No Answer / kshitij Without the use of cursor fetching sqlcode sqlstate 21000 two or more rows. Is This Answer Correct ? 49 Yes 6 No Answer / rami reddy If single select returns more than one row then you get SQLCODE = -811 Is This Answer Correct ? 34 Yes http://www.ibm.com/support/knowledgecenter/SSEPEK_10.0.0/codes/src/tpc/n811.html 3 No Answer / bharani We get error -811, when 'WHERE' criteria in singleton query matched with multiple rows of a table, it can only fetch and process one row at a time. Only way to avoid this error by using cursor concepts. Is This Answer Correct ? 26 Yes 1 No Answer / toms k jose multiple rows retrieved. Is This Answer Correct ? 7 Yes 0 No Answer / bruno Registro duplicado na tabela http://www.allinterview.com/showanswers/6301/what-is-sqlcode-811.html DB2 Is This Answer Correct ? 1 Yes 4 No Answer / marek The one correct answer is: "Look at DB2 doc." Who remember all sql error codes? Is This Answer Correct ? 19 Yes 37 No Post New Answer Categories COBOL (884)JCL (728)CICS (459)DB2 (684)IMS (80)IDMS (42)Natural (43)ADABAS (9)REXX (23)Assembler (31)CLIST (6)QMF (30)MVS (12)OS390 (8)OS 2 (6)VSAM (177)QSAM (4)Sysplex (5)IBM MainFrame AllOther (160) More DB2 Interview Questions Can we declare DB2 HOST variable in COBOL COPY book? 2 Answers What is the command used by TSO users to invoke DB2? 2 Answers is there any restrictions for unions ? 4 Answers Patni, Where is the access path logic created by the DB2 Optimizer stored? 1 Answers When DB2 connection fails, will online program work or give errors. 1 Answers Virtusa, Hi Team, Please tell me, If i don't declare the cursor in the program and i have given open and fetch and close, then what error will get. 6 Answers IBM, What is the difference between Where and Having Clause 7 Answers iFlex, What will the DB2 optimizer do? 2 Answers how to get duplicate records from tables?write qurey for this? 4 Answers ANZ, How to resolve -803 sql code in DB2? 3 Answers Cap Gemini, How does one bind 2 versions of a CICS transaction with the same module name i
Management Accounting Operating System Operating System Android iOS Microsoft Coding Programming J2EE Languages Database Database Data Warehousing Oracle Applications Applications Clarify CRM Oracle Apps Peoplesoft Siebel Software Testing Testing Testing Tools Miscelleanous Helpdesk Mainframe Networking SAP R/3 Web Interview http://www.geekinterview.com/question_details/85600 Coaching Career Counseling Job Interview Interview eBooks Accounting eBook C eBook Citrix eBook Job http://www.dbforums.com/showthread.php?990624-811-error Interview eBook Career Advice Career Change Jobs Help Projects Requests Resume Help Training Advice Engineering Chemical Engineering Civil Engineering Electrical Engineering Electronics Engineering Micro Processor Mechanical Engineering By Company Ask Question Home Interview QuestionsMainframeDB2 -811 abend When will occur -811 abend? how will u resolve the -811 abend? rpg0247 ProfileAnswers by rpg0247Questions by rpg0247 Jul 2nd, 2011 7 db2 sql 9479 Questions by rpg0247answers by rpg0247 DB2 Answer First Prev Next Last Showing Answers 1 - 7 of 7 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. Was this answer useful?Yes 1 Reply chandu Jul 14th, 2011 THE RESULT OF AN EMBEDDED SELECT STATEMENT db2 sql error 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. Was this answer useful?Yes 1 Reply BrantleyL1 ProfileAnswers by 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. Was this answer useful?Yes 1 Reply jzmoonrock56 ProfileAnswers by jzmoonrock56 Aug 31st, 2011 A singleton select returned more then one row you must declare a cursor and fetch rows or correct the table. Was this answer useful?Yes 1 Reply 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. Was this answer useful?Yes 1 Reply 6983manish ProfileAnswers by 6983manish Nov 12th, 20
by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. Results 1 to 5 of 5 Thread: -811 error Tweet Thread Tools Show Printable Version Subscribe to this Thread… Search Thread Advanced Search Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode 03-25-04,23:15 #1 starra View Profile View Forum Posts Registered User Join Date Sep 2003 Location manila Posts 21 Unanswered: -811 error In a COBOL program that executes a simple sql statement without using a cursor, does DB2 evaluates all the values return by the SQL before flagging the -811 error or Upon fetch of 1 and recognizing that another record was fetch right after that, it will flag the -811? Reply With Quote 03-26-04,01:59 #2 grofaty View Profile View Forum Posts Registered User Join Date Jan 2003 Posts 1,605 Hi, Please read Must read before posting thread for more tips on how to write effective post. Hope this helps, Grofaty Reply With Quote 03-26-04,02:07 #3 starra View Profile View Forum Posts Registered User Join Date Sep 2003 Location manila Posts 21 I'm using DB2 ver 7 for Z/OS. -811 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 ROW. Explanation: Execution of an embedded SELECT statement has resulted in a result table containing more than one row. Alternatively, a subquery contained in a basic predicate has produced more than one value. However I would like to know if DB2 stores or read the entire result of the sql before flagging -811 sqlcode Reply With Quote 03-26-04,04:11 #4 Walter Janissen View Profile View Forum Posts Registered User Join Date Nov 2003 Location Germany Posts 62 DB2 only checks, if there is a second row which qualifies. If this is the case, it will return a -811. To prevent DB2 from doing this, is to add the clause FETCH FIRST 1 ROW ONLY. Reply With Quote 03-26-04,04:17 #5 starra View Profile View Forum Posts Registered User Join Date Sep 2003 Location manila Posts 21 thanks! =) Reply With Quote Quick Navigation DB2 Top Site Areas Settings Private Messages Subscriptions Who's Online Search Forums Forums Home Forums Non-SQL Forums MongoDB Database Server Software Adabas DB2 Informix Microsoft SQL Server MySQL Oracle Pervasive.SQL PostgreSQL Sybase Other Data Access, Manipulation & Batch Languages ASP Crystal Reports Delphi, C etc JAVA Perl and the DBI PHP ANSI SQL Unix Shell Scripts Visual Basic