• dwain.c (8/25/2014)


    Eirikur Eiriksson (8/24/2014)


    dwain.c (8/24/2014)


    Maybe I'm missing something here but I think there's no reason to construct a delimited list at all.

    SELECT a.CVID, a.JobNoticeID, IsMatch=CASE WHEN b.JobNoticeID IS NOT NULL THEN 1 ELSE 0 END

    FROM dbo.x_JobMatching a

    LEFT JOIN @t_JobNoticeID b ON a.CVID = b.cvid AND a.JobNoticeID = b.JobNoticeID;

    It is my understanding that the delimited list is what has to be matched, otherwise as you say Dwain, it is a straight forward join.

    😎

    The reason I posted that (and I'm not saying this is the case here), is that I've seen quite a few occasions where the OP wants to lead us down a path that is unnecessary due to their own preconceptions.

    Hence the importance of getting the "what" out of the OP, preferably ignoring the "how";-)

    In this case I have this hunch that you are spot on though.

    😎