Easy update (but not for me:( [message #239790] |
Wed, 23 May 2007 05:37 |
juhani
Messages: 7 Registered: May 2007
|
Junior Member |
|
|
Hi,
I need for this UPDATE-clause. I have forgot the syntax for it.
UPDATE TABLE1
SET TABLE1.col1=' ', TABLE1.col2=' '
where TABLE1.col1=TABLE2.col1
and TABLE1.col2=TABLE3.col2
And TABLE1.Col2=TABLE3.Col1
-juhan
|
|
|
|
Re: Easy update (but not for me:( [message #239796 is a reply to message #239790] |
Wed, 23 May 2007 05:54 |
Cthulhu
Messages: 381 Registered: September 2006 Location: UK
|
Senior Member |
|
|
I can't really see it working, since table2 and table3 don't appear in the update or a subquery. You might want something like:
UPDATE TABLE1
SET TABLE1.col1=' ', TABLE1.col2=' '
where exists
(select 1 from table2 where
TABLE1.col1=TABLE2.col1)
and exists
(select 1 from table3
where TABLE1.col2=TABLE3.col2
And TABLE1.Col2=TABLE3.Col1)
|
|
|