August 3, 2015 at 10:26 am
I have to build ssis package
which take file name like ABC_DEF_GHT_20150803_FG.xml
I need to split this file name and store into variable like
Name: ABC
lastname: DEF
status:GHT
date:20150803
and this 4 parameter need to use into sp
so how I can build ssis package or how I can use derive column to slipt a string and store value in variable
Thansk
August 3, 2015 at 10:33 am
Get the file name into a variable.
Use Token to break the file name into the components you need and assign these components to other variables.
Add an ExecuteSQL task to execute the proc, using the variables (which you have just populated) as parameters.
The absence of evidence is not evidence of absence.
Martin Rees
You can lead a horse to water, but a pencil must be lead.
Stan Laurel
August 3, 2015 at 11:47 am
Phil Parkin (8/3/2015)
Get the file name into a variable.Use Token to break the file name into the components you need and assign these components to other variables.
Add an ExecuteSQL task to execute the proc, using the variables (which you have just populated) as parameters.
Or you can pass the filename as is to the stored procedure in an ExecuteSQL task and parse the filename in the procedure to appropriate components.
Using a splitter like dbo.DelimitedSplit8K passing the string up to but not including the .xml would work as well.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply