• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 396
  • Last Modified:

how do you define/wire a precedence constraint condition between two tasks in an SSIS package

Expert: New to SSIS Integration Services Packages.
I have a Execute SQL Task and a Send Mail Task with a precedence constraint between them. I want to know how to create an constraint expression (scalar value?) from the Execute SQL Task query code listed below such that when the query results  sets Email = 1 the constraint  is satisfied and the Send Mail Task executes. Please show me how to create the Constraint Expression.

Part of the "Execute SQL Task"  query code:
UPDATE TableA
SET Email = 1
WHERE 4 <= datediff(hh, startDate, getdate())
etc ...etc.....


0
tcmmaxt
Asked:
tcmmaxt
1 Solution
 
ISO30Commented:
Assuming each record contains an email address, a constraint may not be be the best way to go- the following seems more appropriate:

1) Update the records as shown in your SQL

2) Loop back through those records and send the email for each record where Email = 1.

I can expand on this if the concept sounds right. Use of constraints are more appropriate for scalar results (e.g. if xxx is in table yyy).
0
 
tcmmaxtAuthor Commented:
ISO30: thanks.  I am new to this SSIS stuff. If you can somhow show me how to loop thru records and send out email for those records flagged Email = 1 that would be great since I am not sure  how to do this. Also I guess I would need some kind of  job set-up to run the package say each morning? Also the email messages in body are not status and will need to to reflect data relative to that record. Not sure how to do this?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now