I have an index view which I run a query against with
WHERE GETDATE() BETWEEN start_date AND end_date
in the WHERE
clause.
I suspect that the answer to my question is probably going to be no, but, is it possible to push this into the index view or do something clever to achieve the same effect?
My concern is that what the index view will use from GETDATE()
will be whatever GETDATE()
returns when the index view is created, which is not what I want. I always want this to be the be current date and time. Also, I'm using SQL Server 2008.