Quote:
How can I do this in MS SQLserver (7.0 or 2000) |
Unfortunately, SQL Server does not have the SQL-92 syntax for a "SET
ROW()= ..." clause, so you do one column at a time.
UPDATE T1
SET T1.v1 = (SELECT T2.v1
FROM T2
WHERE T1.key = T2.key),
T1.v2 = (SELECT T2.v2
FROM T2
WHERE T1.key = T2.key)
WHERE T1.v3 LIKE '%'; -- strange predicate?
They have a version of the UPDATE.. FROM.. that appeared in Sybase and
other products. Unfortunately, it is unpredictable, does not port and
does not match the semantivcs of other products with the same syntax.