S
Samantha
I've been stuck with this query for hours. I need to get the first date and
the Order Number of the first date. But what I'm getting is the fist date but
the minimum Order Number.
Here's my query:
SELECT qryTotalWOPO.PartNumber, Min(qryTotalWOPO.FirstWOReqDate) AS
MinOfFirstWOReqDate, First(qryTotalWOPO.FirstWOQty) AS FirstOfFirstWOQty
FROM qryTotalWOPO
GROUP BY qryTotalWOPO.PartNumber
ORDER BY qryTotalWOPO.PartNumber, Min(qryTotalWOPO.FirstWOReqDate);
Sample data from query qryTotalWOPO:
PartNumber, FirstWOReqDate, FirstWOQty
00-000001, 6/15/2006, 500
00-000001, 7/14/2006, 475
The query result should should be first line:
PartNumber, FirstWOReqDate, FirstWOQty
00-000001, 6/15/2006, 500
Instead, the result is a mixed of the two lines of data:
PartNumber, FirstWOReqDate, FirstWOQty
00-000001, 6/15/2006, 475
Can anyone help me with this? It's frustrating to mention the least!
Thanks in advance!
the Order Number of the first date. But what I'm getting is the fist date but
the minimum Order Number.
Here's my query:
SELECT qryTotalWOPO.PartNumber, Min(qryTotalWOPO.FirstWOReqDate) AS
MinOfFirstWOReqDate, First(qryTotalWOPO.FirstWOQty) AS FirstOfFirstWOQty
FROM qryTotalWOPO
GROUP BY qryTotalWOPO.PartNumber
ORDER BY qryTotalWOPO.PartNumber, Min(qryTotalWOPO.FirstWOReqDate);
Sample data from query qryTotalWOPO:
PartNumber, FirstWOReqDate, FirstWOQty
00-000001, 6/15/2006, 500
00-000001, 7/14/2006, 475
The query result should should be first line:
PartNumber, FirstWOReqDate, FirstWOQty
00-000001, 6/15/2006, 500
Instead, the result is a mixed of the two lines of data:
PartNumber, FirstWOReqDate, FirstWOQty
00-000001, 6/15/2006, 475
Can anyone help me with this? It's frustrating to mention the least!
Thanks in advance!