Distributed Query

  • Hi Team,

    i have two tables, i want a query to retrieve records available in (Instance 1) Table : A and missing in (Instance 2) Table :B.

    Table_1: ID | CHARACTER

    1A

    2B

    3C

    4D

    5E

    Tabe_2 : ID | CHARACTER

    1B

    2D

    3C

    Output should be :

    1 A

    2 B

    4 D

    5 E

    select * from Table_1 T1

    LEFT join [SHH05\SVR1].Students.dbo.Stud_info T2

    ON T1.ID=T2.ID

    but am not getting the exact result, can u please help me...

  • See http://www.sqlservercentral.com/Forums/Topic1433051-391-1.aspx#bm1433101 for suggestions

    -------------------------------Posting Data Etiquette - Jeff Moden [/url]Smart way to ask a question
    There are naive questions, tedious questions, ill-phrased questions, questions put after inadequate self-criticism. But every question is a cry to understand (the world). There is no such thing as a dumb question. ― Carl Sagan
    I would never join a club that would allow me as a member - Groucho Marx

  • Minnu (3/21/2013)


    Table_1: ID | CHARACTER

    1A

    2B

    3C

    4D

    5E

    Tabe_2 : ID | CHARACTER

    1B

    2D

    3C

    Output should be :

    1 A

    2 B

    4 D

    5 E

    On what basis you are avoiding "C" OR how results comes here . what to include and what to exclude in results . Please clarify.

    -------Bhuvnesh----------
    I work only to learn Sql Server...though my company pays me for getting their stuff done;-)

Viewing 3 posts - 1 through 2 (of 2 total)

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