Home Forums SQL Server 2008 SQL Server 2008 - General Query date range, how about the query knowing when the last time it was ran? RE: Query date range, how about the query knowing when the last time it was ran?

  • You're pretty much looking at some kind of control table for that purpose, unless you have some way of controlling it in the application. Triggers won't work for this due to not responding to SELECT actions.

    You COULD do something weird with the index scan/seek statistics I suppose, but that's still going to require some work on your part to determine the query had been run (and assumes nothing else uses that index, which seems unlikely.)