• Nevyn changed my create table statements to use your table names and ran your code:

    SELECT *

    FROM Table_A a

    LEFT OUTER JOIN

    (SELECT B_ID,A_ID,City,State,Zip

    FROM Table_B b

    INNER JOIN

    (SELECT A_ID,bid=(min B_ID)

    FROM Table_B

    GROUP BY A_ID) as inner

    ON inner.bid=b.B_ID) as outer

    ON a.A_ID=outer.A_ID

    Result: Msg 102, Level 15, State 1, Line 7

    Incorrect syntax near 'B_ID'.

    Wondering what I did incorrectly?

    If everything seems to be going well, you have obviously overlooked something.

    Ron

    Please help us, help you -before posting a question please read[/url]
    Before posting a performance problem please read[/url]