Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
andypgill
Starting Member
34 Posts |
Posted - 2013-02-13 : 10:47:06
|
Hi AllI'm importing a number of tables with SSIS. I have a variable Filename used to select each individual file.I want to copy the value of this variable to a SQL table FilesImported each time a file is selected.I've added an execute SQL Task in the for loop container with the codeINSERT INTO dbo.FilesImportedSELECT + @[User::FileName] This isn't copying the value of the variable to the table.Any help would be appreciated. |
|
tm
Posting Yak Master
160 Posts |
Posted - 2013-02-13 : 13:29:53
|
Here is one option ..SSIS - SQL Task >>In Execute SQL Task EditorGeneral - SQLStatement ..Code..DECLARE @Fname varchar(50)SET @Fname = ? -- filename passed to variableINSERT INTO dbo.FilesImportedSELECT @Fname In Execute SQL Task Editor >>Parameter Mapping ..Add >>Variable Name = User::FileNameDirection = InputData Type = VARCHARParameter Name = 0Parameter Size = -1 |
|
|
|
|
|