• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 393
  • 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

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

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