Monday, March 26, 2012

Read the filename, split it and put it in a table

Hello

I'm working on a package which loops through each xml file in a folder.
The name of each xml file is put in variable.
The format of the filename is something like "part1_part2_part3.xml"
I need to store the 3 parts in three different columns of table A
The content of the xml file needs to be manipulated ("." needs to be replaced with ",", ....)and put in serveral columns in tableB

It's not clear to me yet how to start this but my main concern is read the three parts of the filename. I don't find any task in SSIS which could help me with that.

Could someone give me some pointers?

Many thanks!

Worf

Since you alreday have the name of the file in a varibale; then create 3 extra variables and use the expression property for getting the part name. when looking into a variable press F4 to display the property panel and then change the property 'EvaluateAsExpression' to true; then you would have access to the expression builder. There are some string functions there.

Rafael Salas

|||how do you get the filename into a variable?|||

Cobr94 wrote:

how do you get the filename into a variable?

This a previous tread where i described something similar; I hope you can use it

Rafael Salas

sql

No comments:

Post a Comment