I am preparing weekly reports using Excel by using data from SQL. I have table in SQL database named "Campaign" in this table I have (CampaignID, year, month, day, cost, clicks, impressions) I would like to write a query that select data between "july 27" and "August 08". I tried using this query:
[ select * from campaign where month between '07' and '08' ]
but it gives me data within these two months but I cant specify the days..
the user usually get prompted to enter year, month and day in Excel by getting data from "other source" as "other Microsoft query"
I know you would properly think why I don't have "date" column instead that specify the exact date I tried doing that but the format of the date is “ 2014-08-01 00:00:00.000” and what the user enter is "01-08-2014" so varchar cannot be read as datetime
Any help how can I solve my problem!