Oracle Error 1422 Encountered
Contents |
MySQL MariaDB PostgreSQL SQLite MS Office Excel Access Word Web Development HTML CSS Color Picker Languages C Language More ASCII Table Linux UNIX Java Clipart Techie ora 01422 exact fetch returns more than requested number of rows oracle Humor Advertisement Oracle Basics ALIASES AND AND & OR BETWEEN COMPARISON OPERATORS
Ora-01422 Exception Handling
DELETE DISTINCT EXISTS FROM GROUP BY HAVING IN INSERT INSERT ALL INTERSECT IS NOT NULL IS NULL the number specified in exact fetch is less than the rows returned JOIN LIKE MINUS NOT OR ORDER BY PIVOT REGEXP_LIKE SELECT SUBQUERY TRUNCATE UNION UNION ALL UPDATE WHERE Oracle Advanced Oracle Cursors Oracle Exception Handling Oracle Foreign Keys Oracle Loops/Conditionals Oracle
Ora 01422 Unhandled Exception
Transactions Oracle Triggers String/Char Functions Numeric/Math Functions Date/Time Functions Conversion Functions Analytic Functions Advanced Functions Oracle / PLSQL: ORA-01422 Error Message Learn the cause and how to resolve the ORA-01422 error message in Oracle. Description When you encounter an ORA-01422 error, the following error message will appear: ORA-01422: exact fetch returns more than requested number of rows Cause You ora-01422 in cursor for loop tried to execute a SELECT INTO statement and more than one row was returned. Resolution The option(s) to resolve this Oracle error are: Option #1 Rewrite your SELECT INTO statement so that only one row is returned. Option #2 Replace your SELECT INTO statement with a cursor. For example, if you tried to execute the following SQL statement: SELECT supplier_id INTO cnumber FROM suppliers WHERE supplier_name = 'IBM'; And there was more than one record in the suppliers table with the supplier_name of IBM, you would receive the ORA-01422 error message. In this case, it might be more prudent to create a cursor and retrieve each row if you are unsure of how many records you might retrieve. Share this page: Advertisement Back to top Home | About Us | Contact Us | Testimonials | Donate While using this site, you agree to have read and accepted our Terms of Service and Privacy Policy. We use advertisements to support this website and fund the development of new content. Copyright © 2003-2016 TechOnTheNet.com. All rights reserved.
Kyte � Last updated: September 09, 2013 - 10:57 am UTC Category: Developer � Version: 2000 Whilst you are here, check out some content from the AskTom team: Something new learned everyday Latest Followup You Asked Hi Tom I'm trying
Oracle Too Many Rows
to execute SQL statment but the result is : ORA-01422 exact fetch returns more than
Ora-01422 Select Into
requested number of rows Cause: More rows were returned from an exact fetch than specified. Action: Rewrite the query to return fewer exact fetch returns more than requested number of rows cursor rows or specify more rows in the exact fetch. So How can I handle this proplem ? Thank you and we said... If you EXPECT the query to return more then one row, you would code: for https://www.techonthenet.com/oracle/errors/ora01422.php x in ( select * from t where ... ) loop -- process the X record here end loop; If you expect the query to return AT LEAST one record and AT MOST one record, you would code: begin select * into .... from t where .... process.... exception when NO_DATA_FOUND then error handling code when no record is found when TOO_MANY_ROWS then error handling code when too many records are found end; https://asktom.oracle.com/pls/asktom/f%3Fp%3D100:11:0::::P11_QUESTION_ID:981494932508 If you just want the FIRST record declare c1 cursor for select * from t where ... begin open c1; fetch c1 into .. if ( c1%notfound ) then error handling for no record found end if; close c1; end; Reviews Write a Review September 24, 2002 - 9:28 am UTC Reviewer: MW from Germany Hi, Tom I have a following Problem. I have a table and it's primary key value get from the trigger ( refer Sequence). It was working file. All of a sudden, when I try to insert values, then I got this Error. ORA-01422: exact fetch returns more than requested number of rows ORA-06512: at "myusr.TRG_LNKPCGRP_PCGRPNO", line 5 ORA-04088: error during execution of trigger 'myusr.TRG_LNKPCGRP_PCGRPNO' But this fetch value is in trigger is as Select SEQ_LNKPCGRP_PCGRPNO.NEXTVAL INTO iCounter FROM Dual; So I am realy in confusing oin this. Could you please help me on this. Thank you in advance. Followup September 24, 2002 - 3:36 pm UTC check to see if someone added a row to dual: ops$tkyte@ORA920.US.ORACLE.COM> @connect "/ as sysdba" sys@ORA920.US.ORACLE.COM> insert into dual values ( 'y' ); 1 row created. sys@ORA920.US.ORACLE.COM> select * from dual; D - X sys@ORA920.US.ORACLE.COM> select count(*) from dual; COUNT(*) ---------- 2 sys@ORA920.US.ORACLE.COM> dual is magic, make sure to COUNT(*) it, not just select * from it s
for Help Receive Real-Time Help Create a Freelance Project Hire for a Full Time Job Ways to Get Help Ask a Question Ask for Help Receive https://www.experts-exchange.com/questions/21736470/EXP-00008-ORACLE-error-1422-encountered.html Real-Time Help Create a Freelance Project Hire for a Full Time Job Ways to Get Help Expand Search Submit Close Search Login Join Today Products BackProducts Gigs Live http://www.progtown.com/topic606406-error-at-performance-of-export-exp00056-oracle-error-1422-encountered.html Careers Vendor Services Groups Website Testing Store Headlines Experts Exchange > Questions > EXP-00008: ORACLE error 1422 encountered Want to Advertise Here? Solved EXP-00008: ORACLE error 1422 exact fetch encountered Posted on 2006-02-14 Oracle Database 1 Verified Solution 3 Comments 6,258 Views Last Modified: 2013-12-11 I have a full export for my development databases and one of the development databases export is failing. Connected to: Oracle9i Enterprise Edition Release 9.2.0.2.1 - Production With the Partitioning, OLAP and Oracle Data Mining options JServer Release 9.2.0.2.0 - exact fetch returns Production Export done in WE8MSWIN1252 character set and AL16UTF16 NCHAR character set server uses US7ASCII character set (possible charset conversion) About to export the entire database ... . exporting tablespace definitions . exporting profiles . exporting user definitions . exporting roles . exporting resource costs . exporting rollback segment definitions . exporting database links . exporting sequence numbers . exporting directory aliases . exporting context namespaces . exporting foreign function library names . exporting PUBLIC type synonyms . exporting private type synonyms . exporting object type definitions . exporting system procedural objects and actions . exporting pre-schema procedural objects and actions . exporting cluster definitions . about to export SYSTEM's tables via Conventional Path ... . . exporting table AQ$_INTERNET_AGENTS 0 rows exported . . exporting table AQ$_INTERNET_AGENT_PRIVS 0 rows exported . . exporting table AQ$_QUEUE_UPGRADE_TMP 4 rows exported . . exporting
Town »Databases »Error at performance of export EXP-00056: ORACLE error 1422 encountered Pages 1 You must login or register to post a reply Topic RSS feed Posts [ 2 ] 1 Topic by Arator 2012-05-09 16:01:28 Arator Member Offline Registered: 2012-05-10 Posts: 13 Topic: Error at performance of export EXP-00056: ORACLE error 1422 encountered I launch the full export, and such error falls outDB - ORACLE 9.2.0.3.0......... exporting triggersEXP-00056: ORACLE error 1422 encounteredORA-01422: exact fetch returns more than requested number of rowsORA-06512: at "XDB.DBMS_XDBUTIL_INT", line 58ORA-06512: at line 1EXP-00056: ORACLE error 1422 encounteredORA-01422: exact fetch returns more than requested number of rowsORA-06512: at "XDB.DBMS_XDBUTIL_INT", line 58ORA-06512: at line 1EXP-00000: Export terminated unsuccessfullySomebody can faced it? 2 Reply by dba 2012-05-09 16:43:28 dba Member Offline Registered: 2002-02-23 Posts: 2,212 Re: Error at performance of export EXP-00056: ORACLE error 1422 encountered The metalink speaks that it happens in a case if the trigger has the same name as any object in basis (the table, I twist, object etc.) Posts [ 2 ] Pages 1 You must login or register to post a reply Programmer's Town »Databases »Error at performance of export EXP-00056: ORACLE error 1422 encountered Jump to forum: .NET .NET GUI ASP.NET ATL/WTL C/C++ C/C++ Applied COM/DCOM/ActiveX Delphi & Builder Java MFC Qt Unix Visual Basic WIN API XML / SOAP Declarative programming Dynamic languages Tools Databases Web Programming Hardware Installation, administration, support Multimedia, graphics, sound Mobile Devices Low-level programming Game Development Network sockets, protocols Miscellaneous Software Algorithms Software Architecture User Interface: design, usability Project Management Application Testing Programming philosophy Etudes for Programmers Education and science About Life Shareware and business Computers Holy Wars - Other Random topics