SELECT Lisa.[Appt Date], Lisa.[Plan Id], Lisa.[Trip Status], Count(Lisa.[Trip Status]) AS [CountOfTrip Status]
FROM Lisa
GROUP BY Lisa.[Appt Date], Lisa.[Plan Id], Lisa.[Trip Status]
HAVING (((Lisa.[Appt Date]) Between [Begin Date] And [End Date]) AND ((Lisa.[Plan Id])=[Enter Plan Id]) AND ((Count(Lisa.[Trip Status]))="begins with D"));
Try this:
SELECT Lisa.[Appt Date], Lisa.[Plan Id], Lisa.[Trip Status], Count(Lisa.[Trip Status]) AS [CountOfTrip Status]
FROM Lisa
WHERE [Appt Date] Between [Begin Date] And [End Date]
AND [Plan Id]=[Enter Plan Id]
AND [Trip Status] Like 'D*'
GROUP BY Lisa.[Appt Date], Lisa.[Plan Id], Lisa.[Trip Status]
;
Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.