Results 1 to 5 of 5

Thread: SQL Statement

  1. #1

    Thread Starter
    Member
    Join Date
    Feb 1999
    Location
    dubai
    Posts
    39

    Post

    Hai,


    I have a Access MDB and a table "Customer"

    Fields are like this...

    Cust_type, Invo_Number, Cust_number

    The data in the table is like this....

    3,1010001987,1000006
    4,1010001987,1000006
    3,1010001988,1000007
    4,1010001988,1000007

    Now I want to select distinct Invo_number and all the other fields in that record.

    This will look like this....
    3,1010001987,1000006
    3,1010001988,1000007

    Can anybody tell me How do I accomplish this with a SQL Statement?



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

  2. #2
    Serge's Avatar
    Join Date
    Feb 1999
    Location
    Scottsdale, Arizona, USA
    Posts
    2,744

    Post

    Select Distinct Cust_type, Invo_Number, Cust_number From Customer

    Regards,

    ------------------

    Serge

    Software Developer
    [email protected]
    [email protected]



  3. #3

    Thread Starter
    Member
    Join Date
    Feb 1999
    Location
    dubai
    Posts
    39

    Post

    Hello Serge,

    That doesn't fulfil my need.

    I have multiple entries of same invo_number and cust_number. How do I pick only one record related to a invo_number?




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

  4. #4
    Guru Clunietp's Avatar
    Join Date
    Oct 1999
    Location
    USA
    Posts
    1,844

    Post

    I think it's SELECT DISTINCTROW, not just DISTINCT....??

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

    Post

    DISTINCTROW is going to omit the details he (?) wants. You need to give more details on what you're trying to do.

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