January 25, 2013 at 5:47 am
January 25, 2013 at 5:54 am
Then I would have dynamic sql generating dynamic sql! I'm afraid it will disappear up it's own rear end! 😀
January 25, 2013 at 8:08 am
Then use CASE WHEN:
...
WHERE CASE WHEN DateTimeInterval = 'mm'
AND [LastRunDate] <= Dateadd(mm, -1 * [DateTimeValue], Getdate())
THEN 1
WHEN DateTimeInterval = 'dd'
AND [LastRunDate] <= Dateadd(dd, -1 * [DateTimeValue], Getdate())
THEN 1
WHEN DateTimeInterval = ...
ELSE 0
END = 1
January 25, 2013 at 8:11 am
Looks like a solution - I'll give it a try
Viewing 4 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply