Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase ««12

Run package when email is received or based on database value? Expand / Collapse
Author
Message
Posted Wednesday, July 10, 2013 1:44 PM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Tuesday, July 8, 2014 9:53 AM
Points: 32, Visits: 305
demin99 (7/10/2013)
b) based on a certain value in a database table?

I think this is possible.

1) Using execute SQL task select the value from the data base.
2) Use the value in the precedence constraint expression to check whether it is true or not.
3) Use loop to check the value.


We did something very similar in a past project. Another process needed to run and complete successfully before our process could be run.

The process we were dependent on was expected to be finshed by 20:00 so that is when we would start our process - which would run via SQL Agent every 15 minutes untill 02:00 the next day.

1) Like demin99, we would use an Execute SLQ task to select a value from a table predicated on the day's date and assign the single row resultset to a variable. There were 3 possible values - "Running", "Staged"and "Complete" (though now in hindsight I suppose there were 4 as there might not have been a record at all in the table for that day's date! But as you'll see NULL would not evalutate to true either.)
2) Again like Demin 99, we would use the variable in the precedence constraint between the SQL Task and the Foreach Loop (or whatever the next component needs to be in your package) and evaluate that the value = "Staged". If it did not evaluate true the package would end there. If it evaluated true the package would continue to process the data.
3) After successfully processing the data we would update the value in the table to "Complete".

Hope this helps!
Post #1472331
« Prev Topic | Next Topic »

Add to briefcase ««12

Permissions Expand / Collapse