So part of my query, I would like to filter the results to show just the ones between a set date range, however, that date range is dynamic, based on an event.
WHERE date d
BETWEEN '2017-01-01' -- just a sample fixed date
AND DATEADD(D, CONTACT_DATE, -1) -- to show a day before Contact Date
Basically just trying see if there was another CONTACT_DATE this year, excluding the day of the actual contact.
I know there could be other ways to do this, but I was wondering if I can tweak a query with the current logic.
Argument data type datetime is invalid for argument 2 of dateadd