Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2004
    Posts
    50

    Unanswered: Need help with a query

    Hi can any body help.

    I have an access 2000 database which has a Fuelcard field and a card use date field
    what i need is a query which will tell me if a certain fuel card has be used 3 times or more on the same day any advise would be a great help

    Regards

    KM

  2. #2
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1
    Quote Originally Posted by KlansMan
    Hi can any body help.

    I have an access 2000 database which has a Fuelcard field and a card use date field
    what i need is a query which will tell me if a certain fuel card has be used 3 times or more on the same day any advise would be a great help

    Regards

    KM
    Try something like that:

    SELECT DISTINCTROW zzz_date.CardNum, zzz_date.dateUsed, zzz_date.Name
    FROM zzz_date
    WHERE (((zzz_date.CardNum) In (SELECT [CardNum] FROM [zzz_date] As Tmp GROUP BY [CardNum],[dateUsed] HAVING Count(*)>2 And [dateUsed] = [zzz_date].[dateUsed])))
    ORDER BY zzz_date.CardNum, zzz_date.dateUsed;

Posting Permissions

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