|
Re: transferring data from a table to another table [message #371996 is a reply to message #371992] |
Tue, 02 January 2001 12:28 |
sverch
Messages: 582 Registered: December 2000
|
Senior Member |
|
|
INSERT INTO TABLE1 (COLUMN1) SELECT COLUMN1 FROM
TABLE2;
0r
UPDATE TABLE1 A SET COLUMN1=(SELECT COLUMN1 FROM
TABLE2 WHERE .....);
Or SELECT 'UPDATE TABLE1 SET
COLUMN1= '||COLUMN1||
' WHERE COLUMN2= '||COLUMN2||' AND...='||...||';'
FROM TABLE2;
Don't forget to put 3 parens if your datatype is CHAR or VARCHAR or like...
|
|
|
Re: transferring data from a table to another table [message #372032 is a reply to message #371992] |
Fri, 05 January 2001 04:57 |
Alvin
Messages: 7 Registered: December 2000
|
Junior Member |
|
|
Hi!
Thanks for the help. But I need some more clarification.
Actually, what im trying to do is transfer to a table data from another table with certain conditions.
This is the script I made but it returns an error
at line 3.
ORA-01427: single-row subquery returns more than one row
update c_cell_in_msc
set bts_int_id=
(select b.int_id
from c_cell_in_msc a, c_bts b
where conf_name = '<ACTUAL>'
and a.int_id = b.btsm_int_id
and a.cell_id = b.cell_id
and b.conf_name = '<ACTUAL>')
where conf_name = '<ACTUAL>'
and bts_int_id is NULL
/
Thanks!
-Alvin
|
|
|