Home » SQL & PL/SQL » SQL & PL/SQL » Difference Between OERR-1422 and OERR-2112
Difference Between OERR-1422 and OERR-2112 [message #18903] Wed, 20 February 2002 16:55 Go to next message
Messages: 38
Registered: May 2001
Hi everybody,
I have a doubt regarding oracle error codes.
I would like to know when does the error 2112 arise and
when does the error 1422 arise.

Description of OERR 2112 IS
02112, 00000, "PCC: SELECT..INTO returns too many rows"

Description of OERR 1422 IS
01422, 00000, "exact fetch returns more than requested number of rows"
// *Cause: The number specified in exact fetch is less than the rows returned.
// *Action: Rewrite the query or change number of rows requested

In my pro*c program, i could get the error 2112 when
my fetch into a scalar variable returns more than 1 row.

When i tried the same in PL/SQL progra,i got 1422 error.

If someone knows more about these two errors, Pls let me know.

Giridhar Kodakalla
Re: Difference Between OERR-1422 and OERR-2112 [message #18926 is a reply to message #18903] Thu, 21 February 2002 06:22 Go to previous message
Suresh Vemulapalli
Messages: 624
Registered: August 2000
Senior Member
2112 is precompiler error message
1412 is oracle error message (pl/sql)

in earlier editions, you can't select more than one value into variables in pl/sql(oracle recently added 'bulk collect into').but in pro*c, it is possible using arrays. i think that is the reason oracle defined 2 different kind of error messages for same error.
Previous Topic: Spooling to a file without select stmt
Next Topic: Adding a sequence number to a table. what should be the datatype of that column?
Goto Forum:

Current Time: Fri Sep 17 11:33:05 CDT 2021