Home > exact fetch > oracle error message ora-01422

Oracle Error Message Ora-01422

Contents

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: Planning for trouble: comments on my latest Oracle Magazine article. Latest ora-01422 exact fetch returns more than requested number of rows ora-06512 Followup You Asked Hi Tom I'm trying to execute SQL statment but the result is ora-01422 exception handling : ORA-01422 exact fetch returns more than requested number of rows Cause: More rows were returned from an exact fetch than ora 01422 unhandled exception specified. Action: Rewrite the query to return fewer 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 the number specified in exact fetch is less than the rows returned return more then one 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 is found when TOO_MANY_ROWS then error

Ora-01422 In Cursor For Loop

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: 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

here for a quick overview

Ora-01422 Select Into

of the site Help Center Detailed answers to trigger raised unhandled exception ora 01422 any questions you might have Meta Discuss the workings and policies of this oracle too many rows site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack https://asktom.oracle.com/pls/asktom/f%3Fp%3D100:11:0::::P11_QUESTION_ID:981494932508 Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up PL/SQL ORA-01422: exact http://stackoverflow.com/questions/19779483/pl-sql-ora-01422-exact-fetch-returns-more-than-requested-number-of-rows fetch returns more than requested number of rows up vote 11 down vote favorite 5 I get keep getting this error I can't figure out what is wrong. "DECLARE * ERROR at line 1: ORA-01422: exact fetch returns more than requested number of rows ORA-06512: at line 11" Here is my code. DECLARE rec_EMPID EMPLOYEE.EMPID%TYPE; rec_ENAME EMPLOYEE.ENAME%TYPE; rec_JOB EMPLOYEE.DESIGNATION%TYPE; rec_SAL EMPLOYEE.SALARY%TYPE; rec_DEP DEPARTMENT.DEPT_NAME%TYPE; BEGIN SELECT EMPLOYEE.EMPID, EMPLOYEE.ENAME, EMPLOYEE.DESIGNATION, EMPLOYEE.SALARY, DEPARTMENT.DEPT_NAME INTO rec_EMPID, rec_ENAME, rec_JOB, rec_SAL, rec_DEP FROM EMPLOYEE, DEPARTMENT WHERE EMPLOYEE.SALARY > 3000; DBMS_OUTPUT.PUT_LINE ('Employee Nnumber: ' || rec_EMPID); DBMS_OUTPUT.PUT_LINE ('---------------------------------------------------'); DBMS_OUTPUT.PUT_LINE ('Employee Name: ' || rec_ENAME); DBMS_OUTPUT.PUT_LINE ('---------------------------------------------------'); DBMS_OUTPUT.PUT_LINE ('Employee Designation: ' || rec_JOB); DBMS_OUTPUT.PUT_LINE ('----------------------------------------------------'); DBMS_OUTPUT.PUT_LINE ('Employee Salary: ' || rec_SAL); DBMS_OUTPUT.PUT_LINE ('----------------------------------------------------'); DBMS_OUTPUT.PUT_LINE ('Employee Department: ' || rec_DEP); END; / oracle plsql oracle11g sqlp

Digital Records Management Enterprise Content Management Strategy Digital Asset Management Oracle Imaging & Process Management Web Content Management Oracle WebCenter Portal Enterprise Portal Support Enterprise Portal Strategy Enterprise Portal Upgrade Oracle WebCenter Sites https://www.tekstream.com/resources/ora-01422-exact-fetch-returns-more-than-requested-number-of-rows/ Sourcing Staffing & Recruiting Recruiting Managed Services Candidate Registration Technical Focus Client Opportunities Support Solutions Training Legacy to Oracle WebCenter Oracle Documents Cloud Service Next Generation AP Automation & Dynamic http://www.lawebdelprogramador.com/foros/Oracle/721405-ORA-01422.html Discounting Oracle WebCenter Contract Lifecycle Management (CLM) Search ORA-01422: fetch returns more than requested number of rowsYou are here: Home / Resources / ORA-01422: fetch returns more than requested number exact fetch of rows ORA-01422 A vast majority of Oracle errors can be broken down into two categories: memory & network problems and issues arising from improper use of syntax & phrasing. Many of the former errors involve interacting with a network administrator to determine where faulty connections and misaligned partitioning of memory are stemming from. The latter, which the ORA-01422 oracle error message can most aptly identify with, concerns a user-initiated mistake resulting from either a typo or a misunderstanding of how Oracle functions may work. So what syntax mistakes are causing the ORA-01422 error? Why are they a problem? And most importantly, how can we fix it? Well, let’s start at the beginning and talk briefly about just what exactly an ORA-01422 really is. The Problem Oracle describes the ORA-01422 error as the “exact fetch” returning “more than requested number of rows”. The type of vague contextual clue that Oracle attaches to this message concerning the error’s origins can be quite infuriating initially. The basics of the problem derive from a failed SELECT INTO statement. This statement pulls data from one or more database tables and subsequently assigns the information to specified variables. In its default setting, the SELECT INTO statement will return one or more columns from a single specified row.  This is where the error is being thrown. When an ORA-01422 is triggered, your SELECT INTO statement is retrieving multiple rows of data or none at all

ProgramadoresIniciar sesiónCorreo: Contraseña: Entrar Recordar sesión en este navegadorRecordar contraseña?Iniciar sesiónCrear cuentaDocumentación y RecursosCursos y ManualesBiblioteca de TemasCódigo FuenteNoticias/ArtículosForos y ConsultasForos de ConsultaChats de prog.Nuevo!!Tablón de NotasDiccionario informáticoProgramadoresProgramadoresOfertas de TrabajoSolicitudes para prog.Lista de CorreoProgramasProgramas/UtilidadesNuestros ProgramasIconos y CursoresPreguntas/RespuestasOtrosUtilidadesColaboradoresEncuestas/EstadísticasContactarLWP » Foros » Oracle » ORA-01422 Oracle - ORA-01422 VolverNuevo Tema<<>> Vista: arbolcronológicoORA-01422tomas(24/11/2006 14:40:30)15.201 visitas3 respuestasRE:ORA-01422jose(24/11/2006 14:49:27)RE:ORA-01422Hernan(23/04/2007 16:55:05)RE:ORA-01422_AYUDAPipe Morales(25/04/2013 00:39:20) ORA-01422Publicado por tomas(1 intervención) el 24/11/2006 14:40:30Tengo este problema y no se que es, si alguien puede ayudar SELECT a.conr_co_contrato, MAX(soli_co_cua) INTO contrato2, maxCUA FROM QWCOGXMO a WHERE a.conr_co_contrato = conr_co_contrato and a.resu_co_resultado = '012' GROUP BY conr_co_contrato,resu_co_resultado; En la tabla hay varios registros con el mismo co_contrato y con soli_co_cua puede ser igual o distinto para cada contrato. Al ejecutar el procedimiento al hacer esta consulta me sale este error ORA-01422: exact fetch returns more than requested number of rows graciasValora esta pregunta0ResponderOtras secciones de LWP con contenido de Oracle- Código fuente de Oracle- Cursos de Oracle- Temas de Oracle- Chat de OracleCódigos de Oracle- Enviar email a traves de Lotus Notes- Convertir de Base64 a ASCII- Rutinas básicas de un analizador semántico RE:ORA-01422Publicado por jose(16 intervenciones) el 24/11/2006 14:49:27El aparente problema que presentas es que ese query regresa varias columnas. en este caso varios a.conr_co_contrato por lo tanto contrato2 no puede guardar varios datos. Asegurate que solo retorne un valor el query y luego le agregas el into con las variablesValora esta respuesta0Comentar RE:ORA-01422Publicado por Hernan(1 intervención) el 23/04/2007 16:55:05Lo que pasa es que te falta una condición adicional para que no te devuelva mas de un resgis

 

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

error ora 01422 exact fetch returns

Error Ora Exact Fetch Returns table id toc tbody tr td div id toctitle Contents div ul li a href Ora Unhandled Exception a li li a href Ora- Select Into a li li a href exact Fetch Returns More Than Requested Number Of Rows Cursor a li ul td tr tbody table p Kyte Last updated September - am UTC Category Developer Version Latest Followup You Asked Hi relatedl Tom I'm trying to execute SQL statment but the ora- exception handling result is ORA- exact fetch returns more than requested number of ora- in oracle forms rows Cause More

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 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