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)
 How to script a "create alias" task

Author  Topic 

ds9
Starting Member

38 Posts

Posted - 2008-01-11 : 07:23:58
Hi ppl

I'm building a simple SSIS that t reads data from a flat file and appends it to a table. The problem is that the file has no headers and it has a considerable amount of columns.
I need to make a column mapping between "column 1" in the file and the actual column name in the table.
To avoid doing it one by one, I was thinking on introducing a script in the data pipeline to change the aliases of the columns of the file.
The problem is the script designer is in VB and I'm not proficient with that.

Can any one tell me what is the VB statement to change the name of the column, or educate me on an alternative way to do it?

This was easy in sql2000 but I can't find a way to do it in sql2005

Many Thanks
JR


visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-01-13 : 01:12:10
You can always go to advanced tab of metadata and rename your columns from Col0,col1,.. to name corresponding to destn table.
Go to Top of Page
   

- Advertisement -