Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Table Update

Author  Topic 

nicka
Starting Member

28 Posts

Posted - 2002-05-14 : 14:17:25
I have an old table "tbl_old" with the following fields:

ColumnA, ColumnB, ColumnC, ColumnD

I have a new table "tbl_new" with the following fields:

ColumnA, ColumnC, ColumnD


I need to update the records in "tbl_old" FROM the records in "tbl_new" based on any matches happening in ColumnA from both tables.


So far I have tried this:


update tbl_old
set tbl_old.ColumnC = tbl_new.ColumnC,tbl_old.ColumnD = tbl_new.ColumnD
FROM tbl_new WHERE tbl_old.ColumnA = tbl_new.ColumnA


I am getting this error message:

Syntax error (Missing Operator in query expression)


robvolk
Most Valuable Yak

15732 Posts

Posted - 2002-05-14 : 14:32:27
Please don't cross-post:

http://www.sqlteam.com/Forums/topic.asp?TOPIC_ID=15890

Go to Top of Page
   

- Advertisement -