Multi column update based on another table
From: Sashi <smalladi_at_gmail.com>
Date: Mon, 14 Jan 2008 16:53:39 -0800 (PST)
Message-ID: <c3cf8116-232d-47de-aa8b-093c1f481edd@q39g2000hsf.googlegroups.com>
update CITI_CIRCUIT_LBCODE A
Set (LOOPBACK_ADDR_A, HOST_NAME_A ) = (SELECT
Date: Mon, 14 Jan 2008 16:53:39 -0800 (PST)
Message-ID: <c3cf8116-232d-47de-aa8b-093c1f481edd@q39g2000hsf.googlegroups.com>
Hi Folks,
I'm writing a simple update statement in Ora 9.2 and am scratching my
head as to why the following syntax is wrong:
update CITI_CIRCUIT_LBCODE A
Set (LOOPBACK_ADDR_A, HOST_NAME_A ) = (SELECT
LOOPBACK_ADDR, HOST_NAME FROM CITI_DEVICE B WHERE A.DEVICE_NAME_A =B.DEVICE_ID);
>[Error] Script lines: 1-7 --------------------------
ORA-01427: single-row subquery returns more than one row
Can someone please help out?
Thanks in advance,
Sashi
Received on Mon Jan 14 2008 - 18:53:39 CST