We help IT Professionals succeed at work.

ssis if statement

PsychoDazey
PsychoDazey asked
on
1,062 Views
Last Modified: 2013-11-10
I have an SSIS package in sql 2005.  I have a file watcher task that kicks off a for-each loop.  I want these tasks to run repeatedly until there are no more files.  It works for the most part, but I need to check the folder again after it does the for-each to see if any more files came in wile it was running BEFORE it executes the tasks outside of the for-each...follow?
Comment
Watch Question

Commented:
Creating another ForEach loop doesn't resolve your problem?!
Cheers!
Pedro

Author

Commented:
Where would I put it?  do you know how to write an expression that counts the files with an .mdb extension in a certain directory?

Commented:
copy past the current foreach loop and link the old to the new one.
to count the number of files, use a script task.
I can do it for you, fo you want?
Regards

Author

Commented:
yes, please help me with the task...I want to count the 8.mdb files after it exits the foreach loop...if there are more files it should run the for-each again, if not it should run the last 2 tasks.

Thanks again!
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Commented:
Improvements?
Regards!
pedro

Author

Commented:
I will be testing this afternoon, thanks again.

Commented:
improvements? :-)
Regards

Author

Commented:
Hi Pedro-
I took what you gave me and modified it to work, i only used 1 for loop and counted the .mdb files each time it ran.  Thanks for the help, I appreciate it!
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.