alexisbr
asked on
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
Thanks,
Alexis
You could map the input to a script that has two outputs and you could assign that intial input to both outputs.
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.
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
Thanks,
Alexis
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Alexis,
Were you able to get this to work for you?
Were you able to get this to work for you?
ASKER
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
Thanks,
Alexis
ASKER
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
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