I'm trying to create a procedure where the user provides the month and year and I hard code the day. But...
1) I don't know how to do the 'end of month' day since it changes
2) I tried to just hard code a day below but I get the error...
Conversion failed when converting the varchar value '/1/' to data type int.
Is there a way to accomplish this?
INSERT INTO tblSafStatsApd ( CurCnt801 )
SELECT Count(tblIncidents.InjuryId) AS CurCnt801
WHERE (((tblIncidents.Date) Between (@Month + '/1/' + @Year) And (@Month + '/31/' + @Year)))
GROUP BY tblIncidents.
HAVING (((tblIncidents.)= 1));