Results 1 to 2 of 2

Thread: Query problems

  1. #1
    Join Date
    Mar 2004
    Posts
    11

    Unanswered: Query problems

    I am running a the following query:

    SELECT [LICENSE_STATE], [LICENSE_PLATE], [TICKET_NUMBER], [DATE_ISSUED], [TIME_ISSUED], [MAKE_TYPE]
    FROM dmv;


    When I run the query I get multiple violations on an individual license plate. I only want it to display the license plate once even if it has multiple violations. I thought I could use a distinct statement to filter out the multiple plate entries but it either filters the plates and does not show any of the other information or it doesn't filter the results at all.

    Here is the distict satement I am using that filters out everything except for the plates.

    SELECT DISTINCT dmv.LICENSE_PLATE
    FROM
    (
    SELECT [LICENSE_STATE], [LICENSE_PLATE], [TICKET_NUMBER], [DATE_ISSUED], [TIME_ISSUED], [MAKE_TYPE]
    FROM dmv
    );


    Any help would be appreciated.

  2. #2
    Join Date
    Mar 2004
    Posts
    11
    Never Mind I figured it out

Posting Permissions

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