Author |
Topic |
poser
Posting Yak Master
124 Posts |
Posted - 2011-10-24 : 11:29:10
|
I have a job with 3 steps but on Fridays I want it to skip step 2.Can I do this in one job or do I need to create another job to do this?Thanks for any helpR/P |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-10-24 : 11:38:05
|
you can do it in one job. check as the 3 step add a if step likeIF DATENAME(dw,GETDATE()) = 'Friday' SELECT 1ELSE <your actual query>------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
poser
Posting Yak Master
124 Posts |
Posted - 2011-10-24 : 11:55:41
|
I'm sorry...I do not understand where to put it...Should this go before step 2 occurs?Thank you, p |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-10-24 : 11:59:59
|
quote: Originally posted by poser I'm sorry...I do not understand where to put it...Should this go before step 2 occurs?Thank you, p
nope that should go inside the current script you've given for step 3------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
poser
Posting Yak Master
124 Posts |
Posted - 2011-10-24 : 12:28:07
|
I'm sorry I'm really new to all this..I want it to skip step 1 on fridays and start at step 2Not sure where to put in script:IF DATENAME(dw,GETDATE()) = 'Friday'SELECT 1ELSE<your actual query>Step 1SSIS Package (checks to see if a txt file is there)Step 2SSIS Package (Import File)Step 3SSIS Package (Copy table)r/p |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-10-24 : 12:53:46
|
oh is 1st step an ssis package?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
poser
Posting Yak Master
124 Posts |
Posted - 2011-10-24 : 12:57:02
|
All are SSIS packages.Sorry I should have clarified better... |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-10-24 : 13:49:56
|
cant do it within job. only way is to tweak the package to add a conditional check in beginning to see if its friday and in that case just return without executing any other steps.------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
poser
Posting Yak Master
124 Posts |
Posted - 2011-10-25 : 09:13:28
|
Thank you for your help and your patience.r/P |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-10-26 : 01:02:32
|
wc------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
|