Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SSIS and Import/Export (2005)
 Dynamic mapping problem..

Author  Topic 

Invinc4u
Starting Member

5 Posts

Posted - 2009-02-05 : 04:58:23
Hi,

I am stuck at a very challenging problem in SSIS.Here it goes :

I have a table A that has n columns ( n > 150).Its columns are like :
a,b,c,x1,x2....xn

I have to use this table to create another table whose structure is :
a,b,c,y1,y2...ym,z (m!=n)

This can be accomplished by using a mapping table C which has the mapping for the column names in the above tables:
x1-y1-z1
x2-y2-z2
x3-y1-z2
x2-y1-z1
..
..
xn-yn-zn

Thus,a column name in A can be associated with multiple column names in B and vice-versa based on z value.

The only approach seems to be to involve the script component in SSIS.I did that but it requires that the output columns be pre-defined which in my case is a big number( > 150).To add on to that the number of column can further increase depending on the new entries in the mapping table.How should i go about solving this problem?

I hope you guys have understood the problem.Any help in this regard would be highly appreciated.

PS:The mapping table has the mapping of the column names and not the values corresponding to those column.

Thanks.

   

- Advertisement -