Home Forums SQL Server 2008 T-SQL (SS2K8) Need help on Update statment with where condition RE: Need help on Update statment with where condition

  • Are you looking for something along those lines?

    WITH cte as

    (

    SELECT DISTINCT cvid FROM [x_ApplyJob] a

    WHERE EXISTS (SELECT 1 FROM [z_JobChecking] c WHERE c.JobCheckingID = a.JobNoticeID)

    )

    UPDATE cv

    SET score = 10

    FROM cte

    INNER JOIN [dbo].[x_CV] cv on cte.cvid = cv.cvid



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]