Question of Choices

  • The help from the previous question i posted has helped a lot and has given me an idea to streamline our operation. When a client sends a file (of banking transactions ) in, i convert that file to XML and use the SSIS to import it into tables, however i am looking at redesigning that part of our operation. Our Clients send in 3 different types of file. Is there a say and of so how, to take a filename from a variable in the SSIS and follow a different route depending on the first letetr of the file name, ie if filename is Afile then it follows the Bulkinsert path, or if its Bfile follow the ftp path

    ie some thing

    (File IN )

    |

    AFile Bfile

    / \

    Bulk Insert FTP Task

  • Yes.  Here is what I would do.  In the control flow tab of your package, put whatever process you have now to get your file name into the variable into a sequence container.  Add one sequence container for each branch you want depending on the first letter of the variable.  Drag a connector from the sequence container that gets the file name to each of the other sequence containers.  Then, double-click one of the connectors to open the "Precendence Constraint Editor" for that connector.  Change the evaluation operation to "Expression" and enter an expression something like SUBSTRING( @[User::MyFile],1,1) == "A" (the substring may be zero-based, I cannot remember).  Don't forget the two equal signs, a single one is an assignment operator.

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply