Wednesday, March 28, 2012

how to utilize user defined template

I'm transferring data from excel to SQL Server database. The columns in excel may be name different each time or some columns are missing, they are optional so is ok. So i'm thinking of having a table that define the columns in the excel and what column do the map to to SQL Server table.

create table mapping (

excel_column_name, sql_server_table_name, sql_server_column ...

)

Something like that.

NOW, is it possible to use that table and read the excel file with SSIS and transfer data using mapping defined in the "mapping" table? If so, what approach can i use?

Thanks!!!

Thanh Duong wrote:

I'm transferring data from excel to SQL Server database. The columns in excel may be name different each time or some columns are missing, they are optional so is ok. So i'm thinking of having a table that define the columns in the excel and what column do the map to to SQL Server table.

create table mapping (

excel_column_name, sql_server_table_name, sql_server_column ...

)

Something like that.

NOW, is it possible to use that table and read the excel file with SSIS and transfer data using mapping defined in the "mapping" table? If so, what approach can i use?

Thanks!!!

Hopefully this answers your question:

Self Modifying Packages in SSIS?
http://sqljunkies.com/WebLog/knight_reign/archive/2005/12/31/17731.aspx

-Jamie

No comments:

Post a Comment