Home > exact fetch > error ora 01422 exact fetch returns

Error Ora 01422 Exact Fetch Returns

Contents

Kyte – Last updated: September 09, 2013 - 10:57 am UTC Category: Developer – Version: 2000 Latest Followup You Asked Hi Tom I'm trying to execute SQL statment but the ora-01422 exception handling result is : ORA-01422 exact fetch returns more than requested number of ora-01422 in oracle forms rows Cause: More rows were returned from an exact fetch than specified. Action: Rewrite the query to return fewer the number specified in exact fetch is less than the rows returned. 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

Ora 01422 Unhandled Exception

row, you would code: for 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 exact fetch returns more than requested number of rows exception handling is found when TOO_MANY_ROWS then error handling code when too many records are found end; 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: o

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 in cursor for loop Humor Advertisement Oracle Basics ALIASES AND AND & OR BETWEEN COMPARISON OPERATORS

Ora-01422 Select Into

DELETE DISTINCT EXISTS FROM GROUP BY HAVING IN INSERT INSERT ALL INTERSECT IS NOT NULL IS NULL

"exact Fetch Returns More Than Requested Number Of Rows" Cursor

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 https://asktom.oracle.com/pls/asktom/f%3Fp%3D100:11:0::::P11_QUESTION_ID:981494932508 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 https://www.techonthenet.com/oracle/errors/ora01422.php 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.

ORA-01422: exact fetch returns more than requested number of rows. [message #472123] Wed, 18 August 2010 23:19 stalin4d Messages: 226Registered: May 2010 Location: Chennai, Tamil Nadu, Indi... Senior Member Dear, ORA-01422: exact fetch returns more than requested number http://www.orafaq.com/forum/t/160843/ of rows. I receive this error because i tried to introduce the below coding in a post query of the block. begin select supplier_cd into :fin_ex_rev_head.vendor_code from fin_ex_rev_receipts where receipt_date between :keyblock.receipt_date and :keyblock.to_date and receipt_no||to_char(receipt_date,'DDMMRRRR') not in (select receipt_no||to_char(receipt_date,'DDMMRRRR') from fin_ex_rev_head where receipt_no is not null) order by invoice_no; end; i know the query gives more data and i need that too. what shall i do in this situation. Thanks exact fetch is Advance. Stalin Ephraim. Report message to a moderator Re: ORA-01422: exact fetch returns more than requested number of rows. [message #472148 is a reply to message #472123] Thu, 19 August 2010 01:38 orakam1808 Messages: 7Registered: August 2010 Junior Member Hi Stalin, You can use Cursor if you want to return more than one rows. Select Into won't work here as it always returns one row. Hope, this exact fetch returns will help. kam Report message to a moderator Re: ORA-01422: exact fetch returns more than requested number of rows. [message #472151 is a reply to message #472148] Thu, 19 August 2010 01:48 stalin4d Messages: 226Registered: May 2010 Location: Chennai, Tamil Nadu, Indi... Senior Member Kam, Cursor too tried, coz its a form level trigger similar to a procedure here we cannot return a value. this is the error i receive: In a procedure, RETURN statement cannot contain an expression [Updated on: Thu, 19 August 2010 01:49]Report message to a moderator Re: ORA-01422: exact fetch returns more than requested number of rows. [message #472155 is a reply to message #472151] Thu, 19 August 2010 02:11 cookiemonster Messages: 12333Registered: September 2008 Location: Rainy Manchester Senior Member What exactly do you want to do with values returned by this select? Report message to a moderator Re: ORA-01422: exact fetch returns more than requested number of rows. [message #473003 is a reply to message #472155] Wed, 25 August 2010 06:12 tamzidulamin Messages: 132Registered: October 2009 Location: Dhaka Senior Member A select statement returns three types result i) Single Record ii) Multiple Record iii) No Record So you have to think first, what will be your des

 

Related content

01422 error

Error table id toc tbody tr td div id toctitle Contents div ul li a href Ora- Exact Fetch Returns More Than Requested Number Of Rows Ora- a li li a href The Number Specified In Exact Fetch Is Less Than The Rows Returned a li li a href Ora- In Cursor For Loop a li li a href Trigger Raised Unhandled Exception Ora a li ul td tr tbody table p MySQL MariaDB PostgreSQL SQLite MS Office Excel Access Word Web Development HTML CSS Color Picker Languages relatedl C Language More ASCII Table Linux UNIX Java p h id

01422 error in

Error In table id toc tbody tr td div id toctitle Contents div ul li a href Ora- Exact Fetch Returns More Than Requested Number Of Rows Ora- a li li a href The Number Specified In Exact Fetch Is Less Than The Rows Returned a li li a href Ora- In Cursor For Loop a li li a href Trigger Raised Unhandled Exception Ora a li ul td tr tbody table p MySQL MariaDB PostgreSQL SQLite MS Office Excel Access Word Web Development HTML CSS Color Picker Languages C relatedl Language More ASCII Table Linux UNIX Java Clipart Techie

how to handle ora-01422 error

How To Handle Ora- Error table id toc tbody tr td div id toctitle Contents div ul li a href Ora- Exception Handling a li li a href Ora- In Oracle Forms a li li a href Ora Unhandled Exception a li ul td tr tbody table p Kyte Last updated September - am UTC Category Developer Version Latest Followup You Asked Hi Tom I'm trying to execute SQL statment but the result is ORA- exact fetch returns relatedl more than requested number of rows Cause More rows were returned ora- exact fetch returns from an exact fetch than specified

ora-01422 error handling

Ora- Error Handling table id toc tbody tr td div id toctitle Contents div ul li a href Ora- Select Into a li li a href Trigger Raised Unhandled Exception Ora a li li a href Frm- Ora- a li ul td tr tbody table p the flexible error trapping and error handling you can use in your PL SQL programs For more information on error-handling and exceptions in PL SQL see PL SQL Error relatedl Handling in Oracle Database PL SQL Language Reference See the end ora- exact fetch returns of this chapter for TimesTen-specific considerations The following topics

oracle error #1422 in the target program

Oracle Error In The Target Program table id toc tbody tr td div id toctitle Contents div ul li a href Ora- Exception Handling a li li a href Ora Unhandled Exception a li li a href Exact Fetch Returns More Than Requested Number Of Rows Cursor a li li a href Frm- Post-query Trigger Raised Unhandled Exception Ora- a li ul td tr tbody table p p p p p p

oracle error 1422 encountered

Oracle Error Encountered table id toc tbody tr td div id toctitle Contents div ul li a href Ora- Exception Handling a li li a href Ora Unhandled Exception a li li a href Oracle Too Many Rows a li li a href Ora- Select Into a li ul td tr tbody table p MySQL MariaDB PostgreSQL SQLite MS Office Excel Access Word Web Development HTML CSS Color Picker Languages C relatedl Language More ASCII Table Linux UNIX Java Clipart Techie ora exact fetch returns more than requested number of rows oracle Humor Advertisement Oracle Basics ALIASES AND AND OR

oracle error 1422

Oracle Error table id toc tbody tr td div id toctitle Contents div ul li a href Ora- Exception Handling a li li a href Oracle Too Many Rows a li li a href Ora- In Cursor For Loop a li li a href Ora- Select Into a li ul td tr tbody table p MySQL MariaDB PostgreSQL SQLite MS Office Excel Access Word Web Development HTML CSS Color Picker Languages C relatedl Language More ASCII Table Linux UNIX Java Clipart Techie p h id Ora- Exception Handling p Humor Advertisement Oracle Basics ALIASES AND AND OR BETWEEN COMPARISON OPERATORS

oracle error code 1422

Oracle Error Code table id toc tbody tr td div id toctitle Contents div ul li a href Ora- Exception Handling a li li a href Exact Fetch Returns More Than Requested Number Of Rows Cursor a li li a href Ora- In Cursor For Loop a li li a href Ora- Select Into a li ul td tr tbody table p CommunityOracle User Group CommunityTopliners CommunityOTN Speaker BureauJava CommunityError You don't have JavaScript enabled This tool uses JavaScript and much of it will not work correctly without it enabled Please turn JavaScript relatedl back on and reload this page

oracle error codes ora-01422

Oracle Error Codes Ora- table id toc tbody tr td div id toctitle Contents div ul li a href The Number Specified In Exact Fetch Is Less Than The Rows Returned a li li a href Trigger Raised Unhandled Exception Ora a li li a href Oracle Too Many Rows a li ul td tr tbody table p MySQL MariaDB PostgreSQL SQLite MS Office Excel Access Word Web Development HTML CSS Color Picker Languages C relatedl Language More ASCII Table Linux UNIX Java Clipart Techie ora- exact fetch returns more than requested number of rows ora- Humor Advertisement Oracle Basics

oracle error message ora-01422

Oracle Error Message Ora- table id toc tbody tr td div id toctitle Contents div ul li a href Ora- In Cursor For Loop a li li a href Ora- Select Into a li ul td tr tbody table p Kyte Last updated September - am UTC Category Developer Version Whilst you are here check out some content from the AskTom team Planning relatedl for trouble comments on my latest Oracle Magazine article Latest ora- exact fetch returns more than requested number of rows ora- Followup You Asked Hi Tom I'm trying to execute SQL statment but the result is

oracle sql error 1422

Oracle Sql Error table id toc tbody tr td div id toctitle Contents div ul li a href Exact Fetch Returns More Than Requested Number Of Rows Cursor a li li a href Ora- Select Into a li li a href Trigger Raised Unhandled Exception Ora a li ul td tr tbody table p MySQL MariaDB PostgreSQL SQLite MS Office Excel Access Word Web Development HTML CSS Color Picker Languages C relatedl Language More ASCII Table Linux UNIX Java Clipart Techie ora- exception handling Humor Advertisement Oracle Basics ALIASES AND AND OR BETWEEN COMPARISON OPERATORS the number specified in exact

provider error ora-01422

Provider Error Ora- table id toc tbody tr td div id toctitle Contents div ul li a href Ora- Exact Fetch Returns More Than Requested Number Of Rows Ora- a li li a href Ora Unhandled Exception a li li a href Ora- In Cursor For Loop a li li a href Frm- Post-query Trigger Raised Unhandled Exception Ora- a li ul td tr tbody table p MySQL MariaDB PostgreSQL SQLite MS Office Excel Access Word Web Development HTML CSS Color relatedl Picker Languages C Language More ASCII Table Linux p h id Ora- Exact Fetch Returns More Than Requested