| Single row query returns more than one row [message #477699] |
Sun, 03 October 2010 21:38  |
hari_bk
Messages: 110 Registered: March 2006
|
Senior Member |
|
|
Hi
I am getting an error "Single row query returns more than one row" in an Exception block.
But in subqueries I am using IN operator not using =.
And I don't have duplicates rows in tables.
What might be reason for this error?
Thanks
HK
|
|
|
|
|
|
|
|
|
|
| Re: Single row query returns more than one row [message #477716 is a reply to message #477701] |
Mon, 04 October 2010 01:08   |
Frank
Messages: 7901 Registered: March 2000
|
Senior Member |
|
|
hari_bk wrote on Mon, 04 October 2010 04:43Your right. But the code is a long package which I can not post here and the reason for posting this is if any one has experienced such error for other than obvious reason they can share.
Thanks anyway
Whenever you get such a basic type of exception, doubt yourself, not Oracle.
|
|
|
|
|
|
|
|
|
|
|
|
| Re: Single row query returns more than one row [message #477840 is a reply to message #477716] |
Mon, 04 October 2010 15:01   |
sunroser
Messages: 16 Registered: September 2010
|
Junior Member |
|
|
Frank wrote on Mon, 04 October 2010 02:08hari_bk wrote on Mon, 04 October 2010 04:43Your right. But the code is a long package which I can not post here and the reason for posting this is if any one has experienced such error for other than obvious reason they can share.
Thanks anyway
Whenever you get such a basic type of exception, doubt yourself, not Oracle.
Hi guys, we are here suppose to help, not to criticize.
Understand you can't post the code, which is fine. Just please do as the following as you can address this type of issue easily.
I assume you have Toad or PL/SQL developer installed. then please choose the package, and enter debug mode. (find the way how to enter debug mode, or let us know which tool you are using), set up the watcher (or variable's value monitor) for the declared section in the package, the step over codes line to line. You will see which line of codes caused the issue.
Remember, using IN or = in your subquery is not related to this issue until you address the exact code line with issue.
|
|
|
|
|
|
| Re: Single row query returns more than one row [message #477981 is a reply to message #477867] |
Tue, 05 October 2010 08:42   |
sunroser
Messages: 16 Registered: September 2010
|
Junior Member |
|
|
Hi, Frank, apology if i misunderstood you, but what makes you think he is "expecting Oracle was wrong"? my understanding is that he is trying to find a guy who experienced the same issue as his one, and be able to point out the issue directly...
But anyway, seems that guy has gone though.
[EDITED by LF: removed unnecessary quote of the whole previous message]
[Updated on: Tue, 05 October 2010 15:49] by Moderator Report message to a moderator
|
|
|
|
|
|
|
|
| Re: Single row query returns more than one row [message #478419 is a reply to message #478417] |
Fri, 08 October 2010 10:18   |
 |
ramoradba
Messages: 2457 Registered: January 2009 Location: AndhraPradesh,Hyderabad,I...
|
Senior Member |
|
|
May be he is expecting like this ...
Question: What might be reason for this error?
Answer:
ORA-01427: single-row subquery returns more than one row
Cause: The outer query must use one of the keywords ANY,
ALL, IN, or NOT IN to specify values to compare because the subquery returned more than one row.
Action: Use ANY, ALL, IN, or NOT IN to specify which values
to compare or reword the query so only one row is retrieved.
So after that he will comes with the other details.
sriram
[Updated on: Fri, 08 October 2010 10:19] Report message to a moderator
|
|
|
|
|
|
|
|