Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
sarahmfr
Posting Yak Master
214 Posts |
Posted - 2012-01-14 : 19:04:17
|
I have package that will run every half an hour.It will pull files from a directory (thousands short ones)They should be processed in orderI am taking file by file in order and extracting the information to a temp table first (I truncate that table then populate it with the extracted data) then run a stored procedure that will take the information in that table and distribute it to several tables and do some processing.Then go and pull the next file and so on.I am worried that at some moment the truncation will affect the second set of data populated i.e.i.e. the second set will be truncated before being processed How to make sure that this would not happen.ThanksThankssarah |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-01-15 : 02:08:47
|
nope. if everything is wrapped inside the for loop with proper precedence set by means of precedence constraints they will only get executed in sequence and never truncation as a part of next iteration will happen before actual processing of data is over for previous iteration------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
sarahmfr
Posting Yak Master
214 Posts |
Posted - 2012-01-15 : 10:44:11
|
Thank you.Can you send me a link how to implement precedence constraints?You are always very helpful.sarah |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-01-15 : 11:41:02
|
i dont have link for but its fairly straightforward. Just click on green dot on bottom of task in control flow and drag and join it to next task to create precedence constraint. Then double click on the line and set an option. you'll have four options1. Constraint2. Expression3. Expression Or Constraint4. Expression And ConstraintConstraint means it will look at constraint dropdown value which can be OnSuccess, OnFailure or OnCompletion which designates whether next task should start once first task was success,failure or just completedExpression means it looks for expression you set in expression window.other two are combinations of above options either both or one of them------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
sarahmfr
Posting Yak Master
214 Posts |
Posted - 2012-01-15 : 11:45:20
|
Thank you very muchsarah |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-01-15 : 11:53:55
|
wc------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
|
|
|