Field Mappings in SSIS

I've created a simple SSIS package loading data from our ERP system to our SQL tables. It has been requested of me that the 1 column (called DESC) from the source table be mapped to 2 columns (1 is called DESC and the other Shortname) in the destination table. Using the SSIS package, once I map a column from the source I cannot map that same column to another column in the source table. I'm guessing this is going to require a SQL statement? If so, what would the syntax be for that?

TABLE 1(SOURCE)              TABLE 2(DESTINATION)
DESC                                     DESC
                                              Shortname
Thank you in advance for your help.
jtlindnerAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
SguzekConnect With a Mentor Commented:
You can use T-SQL syntax:

SELECT col1 as DESC, CAST(col1 AS NVARCHAR(20)) AS Shortname

or you can use CopyColumn transformation on Data Flow tab

Regards,
Slawek
0
 
Kyle AbrahamsSenior .Net DeveloperCommented:
How is shortname defined?
0
 
jtlindnerAuthor Commented:
oops forgot to add that. sorry about that.
shortname is nvarchar (50)
desc is nvarchar (254) (in both tables)
0
 
Anthony PerkinsCommented:
I have no idea what you need, but that las SQL statement should have read:
SELECT col1 as [DESC], CAST(col1 AS NVARCHAR(20)) AS Shortname
0
 
adeel289Commented:
You should try to modify your SSIS package and see the example of Distributing the NAME Column into two Fields First Name and Last Name using SSIS package.
Hope this will help you,
http://vsteamsystemcentral.com/cs21/blogs/applied_business_intelligence/archive/2009/02/01/ssis-expression-language-and-the-derived-column-transformation.aspx
Thank you,
Adeel Shafqat
0
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.

All Courses

From novice to tech pro — start learning today.