Hi,
I need to Copy all values of a column from one table to another. Below are the details:
Source: STL_GRP table, VEND column
Destination PARTNER table, VEND column.
I am using the below query which is incorrect:
[code=oracle]
UPDATE PARTNER
SET VEND=
(
SELECT DISTINCT STL.VEND
FROM STL_GRP STL, PARTNER PRT
WHERE PRT.PARTNER_CD = STL.PARTNER_CD
)
[/code]
This query is returning error: "ORA-01427: single-row subquery returns more than one row", which is true.
Can someone suggest an alternative to do this? Any help will be appreciated. Thanks.
I need to Copy all values of a column from one table to another. Below are the details:
Source: STL_GRP table, VEND column
Destination PARTNER table, VEND column.
I am using the below query which is incorrect:
[code=oracle]
UPDATE PARTNER
SET VEND=
(
SELECT DISTINCT STL.VEND
FROM STL_GRP STL, PARTNER PRT
WHERE PRT.PARTNER_CD = STL.PARTNER_CD
)
[/code]
This query is returning error: "ORA-01427: single-row subquery returns more than one row", which is true.
Can someone suggest an alternative to do this? Any help will be appreciated. Thanks.
Comment