Can a query dependent on another query be completed with 1 SQL statement?

cpberg1

It's always rainy here
Local time
Today, 09:15
Joined
Jan 21, 2012
Messages
79
SELECT STD21Basic.STD21PacketSentDate, Count(STD21Basic.STDID) AS CntSTDID
FROM STD21Basic
GROUP BY STD21Basic.STD21PacketSentDate
HAVING (((STD21Basic.STD21PacketSentDate)>Date()-[Search how many days past?]));

SELECT Sum(qPacketSentCount.CntSTDID) AS [Total Packets in Search]
FROM qPacketSentCount;

Can I write with 1 SQL statement?

Thanks all!
 
What happens if you remove the date field from the SELECT and GROUP BY clauses?
 
Then it works perfectly of course!

I couldn't figure out exactly how to do that in the design view (do not display and type expression would have been good). Trying to learn more and more SQL. Thanks!
 

Users who are viewing this thread

Back
Top Bottom