Link to home
Create AccountLog in
Microsoft SQL Server

Microsoft SQL Server

--

Questions

--

Followers

Top Experts

Avatar of alexisbr
alexisbr

SQL Server 2008 SSIS How to map the same column to 2 different fields
I have another question while converting my old DTS packages from SQL Server 2000 to SQL Server 2008 SSIS.  In a DTS package, I mapped the same incoming value to 2 fields in the database.  I know that may not seem needed but it's a date value that, for some reason, we wanted as a date and time value in separate fields.  I know now I could have probably done this differently but we currently have other processes using these fields and I don't want to make a change now that will cause a domino effect on other parts of our complicated processes.  Is there a way I can map this one field to 2 fields in SQL Server using SSIS?

Thanks,
Alexis User generated image   User generated image

Zero AI Policy

We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.


Avatar of Scott CraigScott Craig🇺🇸

You could map the input to a script that has two outputs and you could assign that intial input to both outputs.

Avatar of Scott CraigScott Craig🇺🇸

To further elaborate, you pass it to a transformation which has one input and two outputs.  In your script, just assign the two outputs to the one input and your script will just assign the input to both outputs.

Avatar of alexisbralexisbr

ASKER

What do I select to get the "transformation" into my package?  I see Script Task, ActiveX Script but nothing that says "Transformation".

Thanks,
Alexis

Reward 1Reward 2Reward 3Reward 4Reward 5Reward 6

EARN REWARDS FOR ASKING, ANSWERING, AND MORE.

Earn free swag for participating on the platform.


SOLUTION
Avatar of AnujAnuj🇮🇳

Link to home
membership
Log in or create a free account to see answer.
Signing up is free and takes 30 seconds. No credit card required.
Create Account

ASKER CERTIFIED SOLUTION
Avatar of Scott CraigScott Craig🇺🇸

Link to home
membership
Log in or create a free account to see answer.
Signing up is free and takes 30 seconds. No credit card required.

Avatar of Scott CraigScott Craig🇺🇸

Alexis,

Were you able to get this to work for you?

Sorry, after I posted this question, I got pulled from this project to work on an emergency issue.  I kept thinking I was going to get back to sooner.  Sorry I didn't update this sooner.  I hope to get back to this in a few hours.  

Thanks,
Alexis

sgroppenbecker,
I apologize again for the delay.  The other project consumed my time for the last week.  I have now tried your suggestion and it worked perfectly.  I used some of the links provided by anujnb to get more details.

In Data Flow, I added a Script Component and selected Transformation, as you suggested.  Then I had to change the arrows so the Flat File Source went to the Derived Column and the the Derived Column connected to the OLE DB Destination.  Within the Derived Column, I had to create a new derived column and assign the column to it.  I kind of played with it until it worked.  I have attached an image showing how I got it to work in case someone else tries this as well.

Thanks again for all your help.
Alexis User generated image

Free T-shirt

Get a FREE t-shirt when you ask your first question.

We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.

Microsoft SQL Server

Microsoft SQL Server

--

Questions

--

Followers

Top Experts

Microsoft SQL Server is a suite of relational database management system (RDBMS) products providing multi-user database access functionality.SQL Server is available in multiple versions, typically identified by release year, and versions are subdivided into editions to distinguish between product functionality. Component services include integration (SSIS), reporting (SSRS), analysis (SSAS), data quality, master data, T-SQL and performance tuning.