• This will work with 2000:

    SELECT

    A.RetailerID,

    b.RetailerIDTheirs

    FROM TableA AS A

    LEFT JOIN TableB AS B

    ON A.RetailerID = B.RetailerID

    AND b.RetailerIDTheirs = (SELECT TOP 1 B2.RetailerIDTheirs

    FROM TableB B2

    WHERE B2.RetailerID = A.RetailerID

    ORDER BY B2.RetailerIDTheirs ASC)

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning