How to map when source feilds are columns in Target?
I have a source table eg. FeildId FeildName Value 1 Name ABC 2 Address XYZ .... so on now the target table has columns as Name, Address etc. Which task or procedure to be followed?
February 11th, 2011 1:06am

Create a data flow task and: 1) Use a source component (OleDB) to get your source. 2) Then use a destination component (oleDB) to point to your target table. 3) Connect those two and use the mapping tab at the destination component to map the source columns to the target columns. Please mark the post as answered if it answers your question | My SSIS Blog: http://microsoft-ssis.blogspot.com
Free Windows Admin Tool Kit Click here and download it now
February 11th, 2011 1:53am

use the OledbDestination Task. Select the database connection of the Destination Database. Drag the green arrow from the Source OledbSourceTask to OledbDestination Task. Right click on the OledbDestination Task----> goto EDIT you will find mappings on the menu on the left side, select that and then map the columns to the destination table. It will work. Any Issues post it. If your problem has been solved please update the post as Answered....
February 11th, 2011 2:06am

If your table looks like: FieldID FieldName Value 1 Name ABC 1 Address 123 2 Name XYZ 2 Address 456 Then you can use this query: SELECT [Name], [Address] FROM PivotTest PIVOT ( MIN(Value) FOR FieldName IN ([Name], [Address]) ) AS xx Please mark as answer if this helps. Thank you. http://thebipalace.wordpress.com
Free Windows Admin Tool Kit Click here and download it now
February 11th, 2011 7:16am

Columns in the target are Feilds to particular columns in Source, So I need to use pivot but how???
February 11th, 2011 7:59am

I didn't get your question ? can u brief me with a sample. Please answer my requirement so that i can give you a solution....
Free Windows Admin Tool Kit Click here and download it now
February 11th, 2011 8:03am

Have you tried my query? Can you post some sample data with more rows?Please mark as answer if this helps. Thank you. http://thebipalace.wordpress.com
February 11th, 2011 8:16am

Columns in the target are Feilds to particular columns in Source, So I need to use pivot but how??? Is there a key that groups the columns? FieldID FieldName Value 1 Name ABC 1 Address 123 2 Name XYZ 2 Address 456 or is it like this: FieldID FieldName Value 1 Name ABC 2 Address 123 3 Name XYZ 4 Address 456 For the last case you need a Script Component as a source. Here is an example: http://beyondrelational.com/blogs/sudeep/archive/2010/08/30/script-component-source-part1.aspx For the first case you can use a pivot as mentioned Saeedss Please mark the post as answered if it answers your question | My SSIS Blog: http://microsoft-ssis.blogspot.com
Free Windows Admin Tool Kit Click here and download it now
February 11th, 2011 8:17am

SELECT [Name], [Address] FROM PivotTest PIVOT ( MIN(Value) FOR FieldName IN ([Name], [Address]) ) AS xx Use the OLEDBSourceTask in the DataFlow Tab. Place the query above while you are Establishing a connection to SqlServer in OLEDBSource , in that select query in the Drop Down List . and place the query. Then use the OledbDestination Task. Select the database connection of the Destination Database.Drag the green arrow from the Source OledbSourceTask to OledbDestination Task. Right click on the OledbDestination Task----> goto EDIT you will find mappings on the menu on the left side, select that and then map the columns to the destination table. It will work. Any Issues post it. If your problem has been solved please update the post as Answered....
February 11th, 2011 8:24am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics