I frequently get asked how you can update a join statement in SQL. Of course, the UPDATE syntax doesn't allow for you do actually perform an update directly against a JOIN statement, but there are some things you can do to work around this problem.
Probably the best way is to do the update like the example below:
UPDATE Job_OpportunitiesSET AwardedId = 1WHERE JobOpportunityId = ( SELECT JO.JobOpportunityId FROM Job_Opportunities JO INNER JOIN Job_results JobResults ON BO.JobOpportunityID = BR.Job_id AND JR.is_us = 1 AND JR.rank = 1 AND JO.JobOpportunityId = Job_Opportunities.JobOpportunityId)
Remember Me
Powered by: newtelligence dasBlog 1.9.6264.0
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.
E-mail
Theme design by Jelle Druyts