Work out every 8 weeks from a start date in Microsoft sql 2005
Posted on 2011-09-23
Can any please help me. I hope i explain this right
I have a sql table, with name addresses, emails etc, but have 2 extra, DateStarted, WeekPeriod
Now, i want to send an email every day, to these people, but, if WeekPeriod = 8 then i only send the email once in every 8 weeks, same as it was 4, then i send the email every 4 weeks from DateStarted.
Normall, i would write a command for each week and just allow x amount of entries, but this needs to be fully dynamic.
Can anyone understand what i mean and able to help.