Hepl with Shortlist Tables

  • SELECT a.Applicant Name, a.Specialization

    FROM [ApplicantTable] a

    LEFT OUTER JOIN [ShortlistTable] s

    ON s.ApplicantName = a.ApplicantName

    WHERE a.Specialization = @Specialization

    AND ISNULL(s.EmployeeID,0) <> @EmployeeID

    Far away is close at hand in the images of elsewhere.
    Anon.

  • Right on spot, if not the case where original poster actually has an employee with id 0.

    Change code above to

    SELECT     a.ApplicantName,

               a.Specialization

    FROM       @Applicant a

    LEFT JOIN  @Shortlist s ON s.ApplicantName = a.ApplicantName

    WHERE      a.Specialization = @Specialization

               AND (s.EmployeeID <> @EmployeeID OR s.EmployeeID IS NULL)


    N 56°04'39.16"
    E 12°55'05.25"

  • E&OE

    Far away is close at hand in the images of elsewhere.
    Anon.

  • I'll bite ... what is "E&OE"?

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • "Errors and Omissions Excepted"

    Far away is close at hand in the images of elsewhere.
    Anon.

Viewing 5 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply