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
 multiple UPDATE

Author  Topic 

tariq2
Posting Yak Master

125 Posts

Posted - 2011-09-22 : 12:45:29
Hi,

I have used the following to update a value in a job,

update D_JobAttributes
set Comments = (Select jccomnts from F590690 where jcmcu = ' 1103765101')
WHERE JobID = '1103765101'

What is the best way for performing a similar UPDATE for a number of Job IDs?


110177270105
110298660103
110299060101
110300270102
110330090101
110330090102
110330100101
110410410101

Kristen
Test

22859 Posts

Posted - 2011-09-22 : 13:01:52
This perhaps?

update U
set Comments = S.jccomnts
FROM D_JobAttributes AS U
JOIN F590690 AS S
ON S.jcmcu = U.JobID

Take a backup first!
Go to Top of Page
   

- Advertisement -