I've two tables with the following fields:
table1 : OTNAME table2 : SNCODE, description_text
I'm trying to add the two columns of table2 to table1 and update the columns. My query is:
alter table table1 add sncode integer
alter table table1 add description_text varchar2(30)
update table1 set
sncode,description_text = (SELECT sncode, description_text
FROM table2, table1
WHERE SUBSTR (otname, INSTR (otname,'.', 1, 3)
+ 1,
INSTR (otname, '.', 1, 4)
- INSTR (otname,'.', 1, 3)
- 1)
= sncode)
I get an error: ORA 00927 - Missing Equal to Operator, pointing to the second line of my update statement. Appreciate if someone can point me in the right direction.
Regards,
novice