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.
Author |
Topic |
nicka
Starting Member
28 Posts |
Posted - 2002-05-14 : 13:44:32
|
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. |
|
mfemenel
Professor Frink
1421 Posts |
Posted - 2002-05-14 : 14:56:21
|
update tbl_old set columnc=n.columnc from tbl_new n inner join tbl_old o on o.columna=n.columnaYou can expand that to add more columns to the update statement, but those are the basics.Mike"..still no custom title" |
 |
|
nicka
Starting Member
28 Posts |
Posted - 2002-05-14 : 15:03:54
|
Mike :I am getting an error message:Syntax error (Missing Operator in query expression)Do you know why?? |
 |
|
mfemenel
Professor Frink
1421 Posts |
Posted - 2002-05-14 : 15:10:23
|
post your code please. much easier that way.Mike"oh, that monkey is going to pay" |
 |
|
nicka
Starting Member
28 Posts |
Posted - 2002-05-14 : 15:23:33
|
I used your exact same code As followsupdate tbl_oldset columnc=n.columnc from tbl_new n inner join tbl_old o on o.columna=n.columna ERROR MESSAGESyntax Error (Missing Operator in Query Expression) |
 |
|
|
|
|