Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2005
    Posts
    8

    Unanswered: selecting distinct rows amongst composite values

    So i have an addressbook table which has the following fields
    srNo, Name, Address, City, State, Zip, Phone

    A number of entries have been entered more than once. the pr key is srNo.

    So there is an entry #1 having the values
    Person1, Address1,City1,State1,Zip1,Phone1

    There is another entry at #10 having values
    Person1, Address1,City1,State1,Zip1,Phone1

    So how do I pull up distinct rows which checks across ALL fields such that the row above comes up only once?

    thank you

  2. #2
    Join Date
    Jun 2005
    Posts
    23
    Code:
    SELECT 
     Name,
     Address,
     City,
     State,
     Zip,
     Phone
    FROM
     table
    GROUP BY
    Name,
     Address,
     City,
     State,
     Zip,
     Phone

  3. #3
    Join Date
    Feb 2005
    Posts
    8

    thank you.

    thanks a lot. that worked

Posting Permissions

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