johnpayback
IS-IT--Management
I need to have this package pull the count for each day for the past 365 days. Currently it will pull the count every night for the previous day but I need it to pull the count for each of the past 365 days and insert them separately based on each day. I do not need to get the total count for the past 365 days...that is easy by changing the -1 to -365. Can I do this with a package or do I need to write a script to do this? Below is the SQL statement for the current package.
thks JP
Code:
Select count(*) as CallCount,
dateadd(d,-1,getdate()) as CallDate,
'CON' as Site
From dbo.master_index where FileDateTime >= convert(char(10),dateadd(d,-1,getdate()),110) AND FileDateTime <convert(char(10),getdate(),110)
thks JP