Query to retrive distinct id in child table

  • Hi i need a query for below scnario

    [font="Arial Black"]TblMaster[/font]

    ID NAME

    100 James

    101 Joseph

    102 Felix

    103 bernadsha

    [font="Arial Black"]TblChild[/font]

    ID NAME LOCATION

    100 James New Jersy

    101 Joseph California

    102 Felix New York

    103 bernadsha sanfransisco

    102 Felxi Sanfransisco

    I need query to retrive records as follows

    100 James New Jersy

    101 Joseph California

    102 Felix New York

    103 bernadsha sanfransisco

    Thanks

  • Please provide DDL and sample data per http://www.aspfaq.com/etiquette.asp?id=5006

    SQL = Scarcely Qualifies as a Language

  • sharma (5/24/2008)


    Hi i need a query for below scnario

    [font="Arial Black"]TblMaster[/font]

    ID NAME

    100 James

    101 Joseph

    102 Felix

    103 bernadsha

    [font="Arial Black"]TblChild[/font]

    ID NAME LOCATION

    100 James New Jersy

    101 Joseph California

    102 Felix New York

    103 bernadsha sanfransisco

    102 Felxi Sanfransisco

    I need query to retrive records as follows

    100 James New Jersy

    101 Joseph California

    102 Felix New York

    103 bernadsha sanfransisco

    Thanks

    To add to what Carl already posted, a query of this simple nature is what a student would be doing... please show what you've tried.

    --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)

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

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