Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2004
    Posts
    277

    Unanswered: Creating CustomerList (Query eliminating Duplicates)

    for the past month and change we have been entering orders into our database

    Customer Example - CompanyA-Terminal(City,State)

    I am trying to create the accounting side to create the customer list with only the main company name and it's billing info

    after creating the query using Left([CompanyName],InStr([CompanyName],'-')-1)

    now I have

    CompanyA
    CompanyA
    CompanyA
    CompanyB
    CompanyB
    CompanyB

    how do I create a new table eliminating duplicates so it would be
    CompanyA
    CompanyB
    and so on...

  2. #2
    Join Date
    Jul 2003
    Location
    Michigan
    Posts
    1,941
    Use the DISTINCT clause in your Query

    Select DISTINCT Left([CompanyName],InStr([CompanyName],'-')-1)
    ...
    Inspiration Through Fermentation

  3. #3
    Join Date
    Dec 2004
    Posts
    277
    thank you that worked wonderfully

Posting Permissions

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