Results 1 to 2 of 2
  1. #1
    Join Date
    May 2004
    Posts
    45

    Unhappy Unanswered: Query questions, filtering or sorting of columns

    I have a database of automobiles. I have many many columns, it is blank of course until I can start filling it with information.
    I will have four main rows. Yearnum, Make, Model, and VehicleStyle columns
    I will use Honda Accord as an example.
    Honda has made the Accord since probably the 80's
    I know that if I
    SELECT yearnum
    FROM YearNum
    ORDER BY yearnum

    I am using C++ Builder too..
    it will put all my years in order, in a combo box. But I believe it will also have duplicates, like for example They may have made a 1995 Honda Accord and then made a 1995 Honda accord LS which may have different wiring colors and speakers sizes than the regular accord.
    Is there anyway to filter out multiple years, so I could just have the regular order of years?

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    look up DISTINCT in the manual
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

Posting Permissions

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