Want to build a query to return quarterly data

  • Thread starter Thread starter Prashant Rao
  • Start date Start date
P

Prashant Rao

Table with three columns - Order number, Created, Shipped. Order Number is
repeated because an order may have several line items.

I want to create a query that shows the number of orders that did NOT ship
in the quarter it was created. Please help - I am a light user of access but
I need this for a report this afternoon. Thanks a lot.
 
SELECT Distinct [Order Number]
FROM [YourTable]
WHERE Format(Created,"yyyyq") <> Format(Shipped,"yyyyq")

That will show all the order numbers that had a least one shipped date that is
not in the same quarter as the created date.

If you want a count then you can use that query as the source for a totals query.

John Spencer
Access MVP 2002-2005, 2007-2008
The Hilltop Institute
University of Maryland Baltimore County
 
Back
Top