i've asked a number of questions today --- thank you for all of the input, today is pretty busy, the assistance is appreciated
i have a table i am selecting from into a new table every night
at all times i want to retain the current 7 days. like if it's Tuesday, i want all the data in there from last tuesday forward
right now the relevant portion of my job just does this:
select * into newtable
where timefield >=confer(varchar,dateadd(d,-7,getdate()),101)
then i go about all the rest of the job and do my thing. old and newtable are renamed...
today, however, i just found that the maintable only contains data from the 29th and 30th.
for the life of me, i can't see how this could have happened
surely there was something in there i missed somewhere.... but, going forward, am i grabbing that data properly? i feel as though i'm not properly accounting for the weekends.