Results 1 to 2 of 2

Thread: Selecting a single record

  1. #1

    Thread Starter
    Member
    Join Date
    Feb 1999
    Location
    dubai
    Posts
    39

    Post

    Hello!

    I need help on SQL.

    There are two tables. Table1 and Table2.

    Table1---------------Table2

    custid---------------custid,address1
    ---------------city,state,.....


    There are multiple records exist in the table2 for a custid with different address. How do I pick only one record with all the fields.

    Thanks In advance....

    Ganraj.

    ------------------
    ganraj.

    [This message has been edited by ganraj (edited 08-16-1999).]

  2. #2
    Frenzied Member
    Join Date
    Aug 1999
    Location
    Santa Clara, Ca , 95058
    Posts
    1,105

    Post

    select t2.custid, t2.field2, ... t2.fieldx
    from table1 t1, table2 t2
    where t1.custid = t2.custid

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width