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
 UPDATE not quite working

Author  Topic 

tariq2
Posting Yak Master

125 Posts

Posted - 2011-10-10 : 08:00:01
Hi, I was just wondering why the following UPDATE
does not work

UPDATE tijobset a
set a.jobkey = b.jobkey
FROM D_jobattributes b inner join tijobset c
on b.jobid = c.jobnumber

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-10-10 : 08:04:34
because its syntactically wrong. it should be


UPDATE c
set c.jobkey = b.jobkey
FROM D_jobattributes b
inner join tijobset c
on b.jobid = c.jobnumber


------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

tariq2
Posting Yak Master

125 Posts

Posted - 2011-10-10 : 08:14:27
Thank you Visakh :)
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-10-10 : 08:43:05
welcome

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -