fatherofthree
MIS
I am kind of new to SQL programming.
I am trying to update multiple fields on a table based on criteria in another table. See code below:
I keep getting the following error:
Error number: -1427, position: 0-
ORA-01427: single row subquery returns more than one row
I understand why I get the error but I am having trouble getting past it to reach my goal.
Any help would be appreciated.
Thanks
Chad
I am trying to update multiple fields on a table based on criteria in another table. See code below:
Code:
UPDATE SHIP
SET SHIP.DETACHED_HOUSE = 0, SHIP.ATTACHED_HOUSE = 0, SHIP.PUD = 0, SHIP.CO_OP = 0, SHIP.CONDO = 1
WHERE SHIP.AP_NUM = (SELECT T.AP_NUM FROM T WHERE T.PROPERTY_TYPE IN('CONDO', 'CONDO-HIGH', 'CONDO-LOW'))
I keep getting the following error:
Error number: -1427, position: 0-
ORA-01427: single row subquery returns more than one row
I understand why I get the error but I am having trouble getting past it to reach my goal.
Any help would be appreciated.
Thanks
Chad