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
 General SQL Server Forums
 New to SQL Server Programming
 Help with an update query

Author  Topic 

estrain
Starting Member

1 Post

Posted - 2005-10-17 : 13:56:39
New to SQL and would appreciate any help I can get. Below is the query i'm trying to run however I'm receiving this error:

Server: Msg 170, Level 15, State 1, Line 1
Line 1: Incorrect syntax near 'b'.


Update Dbo.UPS_GCG_Scrubber_C_IA b
Set a.new_address = b.new_address
from ckssql1.svs_test.dbo.DISTINCT_ADDRESS a, Dbo.UPS_GCG_Scrubber_C_IA b
where a.accountaddress = b.account_addresses

nathans
Aged Yak Warrior

938 Posts

Posted - 2005-10-17 : 14:06:30
Hi there. Welcome to SQLTeam.

You were close! Your query should be as follows (using new join syntax):

Update b
Set new_address = a.new_address
from ckssql1.svs_test.dbo.DISTINCT_ADDRESS a
inner join Dbo.UPS_GCG_Scrubber_C_IA b
on a.accountaddress = b.account_addresses


Kristen, should we add the ol' Update with Join question to the sticky? Seems like it pops up a lot.



Nathan Skerl
Go to Top of Page

anuj164
Starting Member

49 Posts

Posted - 2005-10-17 : 16:45:59
Its a good idea; we should have it in sticky what do you think Kristen
Go to Top of Page
   

- Advertisement -