Subject | Update with data FROM a table |
---|---|
Author | m_formigoni |
Post date | 2005-08-25T14:32:10Z |
Hello again,
I'm trying to do an update in a table using data from another table,
like this:
update TABLE
set FIELD1 = T2.FIELD1,
FIELD2 = T2.FIELD2
from TABLE2 T2
where TABLE.ID = T2.ID
It raises the following error: "Invalid token FROM".
Once more: I used to do this in Sybase...
Does anybody knows how can I do this without declaring variables?
Thanks.
I'm trying to do an update in a table using data from another table,
like this:
update TABLE
set FIELD1 = T2.FIELD1,
FIELD2 = T2.FIELD2
from TABLE2 T2
where TABLE.ID = T2.ID
It raises the following error: "Invalid token FROM".
Once more: I used to do this in Sybase...
Does anybody knows how can I do this without declaring variables?
Thanks.