• Phil Parkin (6/3/2014)


    I suggest you change your approach slightly.

    Create a FOREACH container which executes for every occurrence of the file you want to process. It will therefore execute either once or not at all.

    Put your processing logic inside the FOREACH container.

    The package will complete successfully and do nothing if the file is not found.

    Ok, I've configured the container, but I'm not sure how it will know when to proceed to the next task or exiti the package. What elements need to go into it? I've got...

    1) 'Check File Exists' - this is the script that looks for the file;

    On success:

    2) Generic Import Sproc - this imports data from any files found above.

    On success moves to another sproc, but on failure..

    3) Send FailMail (actually uses an 'execute SQL' task to have a SQL Server email out this message), if the file is there but cannot be imported, and I DO want to the package to fail if this is the case (Vs simply exiting gracefully if no files found)