# Update Multiple Rows in a single table

**URL:** <https://forums.toadworld.com/t/update-multiple-rows-in-a-single-table/29949>\
**Category:** Toad for SQL Server\
**Created:** [April 30, 2014, 11:15am UTC](https://forums.toadworld.com/t/update-multiple-rows-in-a-single-table/29949 "2014-04-30T11:15:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jepotter](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/jepotter/32/236_2.png) [@jepotter](https://forums.toadworld.com/u/jepotter)\
**Post date:** [April 30, 2014, 11:15am UTC](https://forums.toadworld.com/t/update-multiple-rows-in-a-single-table/29949/1 "2014-04-30T11:15:37Z")

</div>

I am attempting, using the below statement, to update multiple rows:

update mis\_user.mis\_testr ts  
set ts.CURRENT\_BALANCE = (select dr.current\_balance  
from MIS\_USER.MIS\_DATAREPAIR dr,  
MIS\_USER.mis\_testr t  
where ts.ORGANIZATION = DR.ORGANIZATION  
and ts.REPORT\_PERIOD = DR.REPORT\_PERIOD  
and ts.ITEM\_NUMBER = DR.ITEM\_NUMBER  
and ts.STOREROOM = DR.STOREROOM)

However, I keep getting the below error… I’ve tried fixing this with subqueries but to no avail

ORA-01427: single-row subquery returns more than one row

Also, when I set the statement to (IN) instead of (=) I get ORA-00927: missing equal sign

any thoughts?

---

<div class="post-metadata">

**Author:** ![s.bertolotti](https://avatars.discourse-cdn.com/v4/letter/s/dc4da7/32.png) [@s.bertolotti](https://forums.toadworld.com/u/s.bertolotti)\
**Post date:** [April 30, 2014, 12:33pm UTC](https://forums.toadworld.com/t/update-multiple-rows-in-a-single-table/29949/2 "2014-04-30T12:33:31Z")

</div>

Hi jepotter,

if I remember correctly error code like ORA-XXXXX is message generated from Oracle database not Microsoft SQL Server.

Are you sure this is an update statement of SQL Server ?

If it’s an update statement of Oracle DB, you must open discussion on Oracle TOAD forum.

Best regards,

Sergio
