Home » SQL & PL/SQL » SQL & PL/SQL » single row subquery returns more than one row
single row subquery returns more than one row [message #278140] Fri, 02 November 2007 01:23 Go to next message
mrkcse
Messages: 62
Registered: November 2007
Location: Mumbai,India
Member
iam getting error as "single row subquery returns more than one row" whenever i update using this two tables.

update mof_m_brnch set brnch_dt =(select effdate from mof_changed where mof_changed.badcat!=mof_m_brnch.brnch_ad_cat and mof_changed.bcode=mof_m_brnch.brnch_bk_cd)




if i replace in with equal sign again iam getting error as " missing equal sign."

please help me.
Re: single row subquery returns more than one row [message #278149 is a reply to message #278140] Fri, 02 November 2007 01:54 Go to previous messageGo to next message
Michel Cadot
Messages: 64109
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Help you in what?
The message is clear your subquery returns more than one row for each or some of the rows of the table you update.
That is, you try to put several values in a single slot.

Change your subquery to make it return only one row per updated table row.

Regards
Michel
Re: single row subquery returns more than one row [message #278842 is a reply to message #278140] Mon, 05 November 2007 23:01 Go to previous messageGo to next message
mrkcse
Messages: 62
Registered: November 2007
Location: Mumbai,India
Member
thanks for your reply .But i have tried using different sub queries but not got the result i want so any related subquery if you post that will be good. anyway i got one solution.please send me your solution also.


thanks for reply.
Re: single row subquery returns more than one row [message #278844 is a reply to message #278140] Mon, 05 November 2007 23:13 Go to previous message
BlackSwan
Messages: 25037
Registered: January 2009
Location: SoCal
Senior Member
>i got one solution.

Then nobody needs to do anything else.

>please send me your solution also.
Forgive me, but you have never stated what the correct answer is.
Previous Topic: Replacing IN with EXISTS
Next Topic: privileges......
Goto Forum:
  


Current Time: Mon Dec 05 07:06:05 CST 2016

Total time taken to generate the page: 0.05299 seconds