I am sure this type of question has been asked before but I searched and could not find it. I am migrating from MS Access to MSServer. Here goes:
I have a table holding company policy document info from 2002 and 2003. Well on one of my pages I have a count of how many documents for each year there are, here is my MS Access query:
strSQL = "SELECT Count(tblBulletins.Access_ID) as Bulletins_2002_Count FROM tblBulletins WHERE Approved = True And Deleted = False AND tblBulletins.DateIssued BETWEEN #1/1/2002# AND #12/31/2002#"
Well when I tried making a Stored Proc out of it changing the True to 1 and False to 0 everything is fine until I get to the date surrounded by #'s.
How can I select a date range in SQL I guess is my question, I tried just putting '1/1/2002' AND '12'31'2002' but no dice. It returned incorrect counts.
Can someone please help.
Joshua