February 15, 2010 at 12:24 pm
I would like to use a precendence constraint with a DATEPART expression to determine which stored proc to run in my SSIS package. If it's a Monday, I want one proc to run. If it's any other day, I want the others to run. I know that in SSMS I can evaluate the day of the week by doing select datepart(weekday,getdate()). If it =2, then I know it's Monday & I want to run one particular proc. I just can't figure out the syntax to put in the expression box of the precedence constraint editor. Can anyone help?
February 15, 2010 at 1:43 pm
I think all you need for the Monday case in the expression box would be:
DATEPART("dw", GETDATE()) == 2
[font="Arial Narrow"]bc[/font]
February 15, 2010 at 1:45 pm
Oops, and for the other days of week path:
DATEPART("dw", GETDATE()) != 2
[font="Arial Narrow"]bc[/font]
February 15, 2010 at 2:45 pm
That worked perfectly. Thank you so much!
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply