Hello All!
I’m having a bit of a problem figuring out how to write a SQL statement to achieve a count of records. Below is the base SQL statement:
SELECT tblMain.Date
FROM tblMain INNER JOIN tblSub ON tblMain.ID = tblSub.ID
GROUP BY tblMain.JobNumber, tblMain.Date
HAVING (((tblMain.JobNumber)=[Job Number]));
This query returns 50 records. How can I write a SQL statement that will return ’50’?
I’ve tried nesting a Subquery:
SELECT Count(tblMain.Date) FROM ……..
…WHERE tblMain.Date IN (SELECT……)
This returns ‘1301’ (obviously a little larger number than expected). Can anyone offer some advice?
Thanks so much!