Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2007
    Posts
    10

    Unanswered: Filtering one example of data from a long list

    Hi all,
    the title isn't very clear so i'll explain.
    I have a database with around 30 records. The data that I have is 10 records of one date, 10 records for another date and 10 records for another. There are 3 different dates which are in the database, but 10 lots of each. There are other details that accompany these dates, but it is the dates I am interested in at the moment.
    What I want is to get the dates and put them into a drop down list in visual studio. This I can do, but at the moment it displays all 30 records. What I want to do is filter this down so it displays just one example of each date, filtering it down to just 3 records. How do you do this?
    Thanks for any help.

  2. #2
    Join Date
    May 2005
    Location
    Nevada, USA
    Posts
    2,888
    Provided Answers: 6
    SELECT DISTINCT DateField
    FROM TableName

    or

    SELECT DateField
    FROM TableName
    GROUP BY DateField
    Paul

  3. #3
    Join Date
    Apr 2007
    Posts
    10
    Cheers!!!

Posting Permissions

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