All- I'm trying to write a query that will automatically pull data from just today (today being the day that the query is run). Currently I have this query:select dateopened from eventwhere eventtype in ('Service Dispatch', 'Reprogram', 'Install')and status NOT IN ('cancelled')and DateOpened>=DateAdd(hh,-12,GetDate())
Obviously the problem is that this will also pull data from the previous day if it's run early enough in the morning. Anyone know of a different way to script this so that it just pulls data from today only when its run at any point in the day?