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
 Other Forums
 MS Access
 Query Help

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.columna


You can expand that to add more columns to the update statement, but those are the basics.



Mike
"..still no custom title"
Go to Top of Page

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??

Go to Top of Page

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"
Go to Top of Page

nicka
Starting Member

28 Posts

Posted - 2002-05-14 : 15:23:33
I used your exact same code As follows

update tbl_old
set columnc=n.columnc from tbl_new n inner join tbl_old o on o.columna=n.columna

ERROR MESSAGE

Syntax Error (Missing Operator in Query Expression)

Go to Top of Page
   

- Advertisement -