Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: SQL-server-2005 SSIS
I've got an SSIS package that's been running for years just fine. It imports some data into a permanent temp table from text files. Now, I need to put data into some columns in the temp table that doesn't come from the text file. I CANNOT alter the text file as it comes from another system. But I need to put the import date/time and another value into the temp table at the time the SSIS package is run. When I run the import wizard to create the package, there doesn't seem to be the possibility of putting data into the table that doesnt come from the text file. I tried adding another column to the list but it insists on matching it up wiht something from the text file and won't allow me to continue. So I'm thinking the only way to do this is to edit the package in bus. intel. dev. studio. From there I could add the values I need. Am I on the right track? Or is there another way to do this?
Posted 24-Feb-12 4:55am

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Either create a new script task that appends the desired data to the database after the data is imported, or assuming the task that performs the import calls a stored proc, have the stored proc append the additional data.
  Permalink  
Comments
avianrand at 24-Feb-12 10:17am
   
That's what I 'm doing now, but where this is currently run by one person at a time, there will be 2 more offices that could do this all at the same time. The data that I'm putting in is a "date/time of import" for the entire batch (every row must have the same date/time so it can't be a datetiemstamp) and an office designation. These 2 columns are initially null and are updated immediately after the import. The update is filtered on the nulls. But it's remotely possible now that 2 people could run this at the exact same time and end up with one of them populating the null values on both batches. I tried to get the people that create the text file to add an office designator column but they can't do that apparently.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 390
1 Jochen Arndt 165
2 Richard MacCutchan 135
3 DamithSL 95
4 Garth J Lancaster 90
0 OriginalGriff 6,045
1 DamithSL 4,601
2 Maciej Los 4,032
3 Kornfeld Eliyahu Peter 3,480
4 Sergey Alexandrovich Kryukov 3,220


Advertise | Privacy | Mobile
Web02 | 2.8.141220.1 | Last Updated 24 Feb 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100