all groups > sql server dts > april 2007 >
You're in the

sql server dts

group:

SSIS Variables in Execute SQL Task



SSIS Variables in Execute SQL Task Jim
4/7/2007 10:50:02 AM
sql server dts: Hi - I have an SSIS package that loops through 36 Excel files and loads them
into a SQL table. I want to add a column to the table that contains the
filename. I was trying to update the table with the filename from the
varExcelName variable I used to enumerate the foreach loop, but can't seem to
Re: SSIS Variables in Execute SQL Task Allan Mitchell
4/9/2007 12:00:00 AM
Hello Jim,


OK so your loop will read the name of the file into a variable. You can
use a Derived Column transform to Derive a column from this variable. That
should do what you need.

--

Allan Mitchell
http://wiki.sqlis.com | http://www.sqlis.com | http://www.sqldts.com |
http://www.konesans.com

[quoted text, click to view]

Re: SSIS Variables in Execute SQL Task Jim
4/9/2007 12:20:04 PM
Thanks, Allan. Can you point me to where I do this? Is it in the data flow?

[quoted text, click to view]
Re: SSIS Variables in Execute SQL Task Allan Mitchell
4/9/2007 7:30:49 PM
Hello Jim,


DataFlow yes

After the Source Adapter and before the Destination Adapter you can add a
derived Column transform. This will add a new column to the pipeline (or
replace an existing one)

As the Expression you simply drag in the name of the variable that holds
the file name

Make sense? If not let me know.

--

Allan Mitchell
http://wiki.sqlis.com | http://www.sqlis.com | http://www.sqldts.com |
http://www.konesans.com

[quoted text, click to view]

Re: SSIS Variables in Execute SQL Task Jim
4/11/2007 4:50:02 AM
Thanks Allan. This was a big help.

[quoted text, click to view]
AddThis Social Bookmark Button