| Help needed with update [message #412314] |
Wed, 08 July 2009 11:27  |
ora1980
Messages: 251 Registered: May 2008
|
Senior Member |
|
|
create table tmp_1(code varchar2(5),id varchar2(10),TYPE VARCHAR2(30))
I have data in this tmp_1, I have another table, tbl_main with above
3 columns + extra columns.
I need to update type column of tbl_main with values of TYPE
from tmp_1, for only the codes and ids
stored in tmp_1
I tried this:
update tbl_main a set TYPE = select type from tmp_1 b )
where a.code = b.code and a.id = b.id
it failed
|
|
|
|
| Re: Help needed with update [message #412320 is a reply to message #412314] |
Wed, 08 July 2009 12:02   |
|
|
Yeah its a real mystery,Even we don't know because we dont have the error message,
Post DDL/DML/Test Case and Error Message,
update tbl_main a set TYPE = select type from tmp_1 b )
where a.code = b.code and a.id = b.id
It even contains Syntactical errors apart from logical errors !!We can only predict it.
|
|
|
|
|
|