Declare Date range for multiple SQL queries in series
Posted on 2013-12-12
I have a series of queries where I need to declare a date range, across the multiple queries there are two different fields that will need to use the date range (if that makes any difference).
WHERE CONVERT(DATETIME, DateOfService, 101) BETWEEN '2013-06-01' AND '2013-12-31'
WHERE CONVERT(DATETIME, CHARTED_DATE, 101) BETWEEN '2013-06-01' AND '2013-12-31'
How do I use the declare syntax to describe the between XYZ and ABC range?