Last post Oct 13, 2015 06:01 AM by pulsmartin
Oct 12, 2015 05:13 AM|pulsmartin|LINK
I have to send reminders.
firstreminder after : 30 days
subsequentreminder every : 15 days
I have a date column 'lasttime'
I want to select those rows where 'lasttime' is 30 days ago, Or lasttime is 45, 60, 75, etc days ago.
So here is what I want to do
Select ... WHERE
datediff(day, lasttime, today.date) = @firstreminder OR datediff(day,lasttime, today.date) - @firstreminder MOD @subsequentreminder = 0
Can this be done within the select statement?
Oct 13, 2015 06:01 AM|pulsmartin|LINK
I tried it and yes it's possible to use the parameters within arithmetic calculations within the select