Is it possible to create Destination Table dynamically via SSIS

  • Hi everybody,

    I'm looking a way to create the destination table dynamically, becasue I have to load lots of excel table into database, I'm thinking to use one SSIS package and deliver the variable to it via DTEXEC. Now I can change the source table (excel) and destination table, and deliver them into the SSIS package. But I found it is difficult to create a destination table for me. Because the Excel tables have not same structure (different columnm and different data type), and the destination tables's structure is defferent from each other. so I have to create the destination table dynamically. I know I can manually create it via the destination import/export wizard, but is there any way to create it via script? like the SQL script "Select * into destinationtable from sourcetable", it can help us create the destination table eventhough we don't know the data type of the source table, is there any to create a similar script for SSIS? really appreciated if you can share anything with me. Thanks a lot:)

    Thanks

    Lindsay

  • You could probably build a script task to handle this but I think you have a much bigger problem. The fact that all the excel files are of a different structure. This is a problem because the metadata for a data-flow task is set at design-time and cannot be changed at run-time. You can change some options but not the names, count, or type of a column in a pipeline.

    With that said, you might look at the import/export wizard as a workaround.

    Sorry..

    CEWII

  • Thanks a lot CEWII. Seems that I have to give us this way to import data from Excel. I will see other way to import data for it. Thanks a lot:)

    Thanks

    Lindsay

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply