• Status: Solved
  • Priority: Medium
  • Security: Private
  • Views: 68
  • Last Modified:

Is there a way to hard code a column value in SSIS using a text file as a source and destination?

I am creating a package with SSIS 2005. It is a very simple package. It reads a fixed width text file with 36 columns and then produces a new text file with 7 columns. One of the columns from the source file is blank and I need to hard code the value of 'A'. If I were using a query to do this, I would just do something like this:

SELECT column1='A', column2, column3 FROM table_a

Is there a way to set the column and value of the column using SSIS 2005 and a text file as the source and destination?

I prefer not to load the data into a table then export to txt, but I will if there is no simple solution.
  • 2
1 Solution
Jim HornMicrosoft SQL Server Developer, Architect, and AuthorCommented:
Add a derived column task in between your source and target, replacing the column that is blank, and hard-code the A.
sqlagent007Author Commented:
THANK YOU! That was so much easier!
Jim HornMicrosoft SQL Server Developer, Architect, and AuthorCommented:
Thanks for the grade.  Good luck with your project.  -Jim
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

A proven path to a career in data science

At Springboard, we know how to get you a job in data science. With Springboard’s Data Science Career Track, you’ll master data science  with a curriculum built by industry experts. You’ll work on real projects, and get 1-on-1 mentorship from a data scientist.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now