ORA:01427: single row sub query returns more than one record [message #598132] |
Thu, 10 October 2013 09:56 |
|
jayant.tripathi
Messages: 8 Registered: October 2013
|
Junior Member |
|
|
Hi
I am not able to update a table cloumn using below query and getting ORA 01427: single row subquery returns more than one record error.
update fuctions f set id = (Select g.fn_id from access g where g.level = 'A' )
where f.u_id = "ABC";
I understand that problem is there with inner select query.
Can you please help me with this?
Thanks.
|
|
|
|
Re: ORA:01427: single row sub query returns more than one record [message #598160 is a reply to message #598132] |
Thu, 10 October 2013 16:23 |
John Watson
Messages: 8929 Registered: January 2010 Location: Global Village
|
Senior Member |
|
|
jayant.tripathi wrote on Thu, 10 October 2013 15:56Hi
I am not able to update a table cloumn using below query and getting ORA 01427: single row subquery returns more than one record error.
update fuctions f set id = (Select g.fn_id from access g where g.level = 'A' )
where f.u_id = "ABC";
I understand that problem is there with inner select query.
Can you please help me with this?
Thanks. This should run, but I have no idea if it is correct in business terms:update fuctions f set id = (Select max(g.fn_id) from access g where g.level = 'A' )
where f.u_id = "ABC";
[Updated on: Thu, 10 October 2013 16:26] Report message to a moderator
|
|
|