Dinamic table join

  • Hi,

    I want to create a package that join dinamic some table. The tables are to be joined are read from a file or from a table from a database. So, the tables to be joined are not known until runtime. Also, the table where the result of the join is put in is not know until runtime (it is read also from a file or from a table).

    How can I create a package that do that?

    Thanks

  • As SSIS is largely meta-data driven and you are not able to provide this meta-data - because it is not known in advance - you will find it difficult (now there's an understatement) to use a dataflow for this.

    Your quickest (in terms of development) solution is probably to use a Script Task to do all the work.

    Is there any consistency about the data, in terms of number of columns, data types? Or is the whole thing completely dynamic?

    The absence of evidence is not evidence of absence.
    Martin Rees

    You can lead a horse to water, but a pencil must be lead.
    Stan Laurel

  • I have a table that map the tables to be joined to the tables where the result of the join is put in:

    ----------------------------------------------

    TableToJoin TableResult ColumnResult

    ----------------------------------------------

    Table1 TableA Col3

    Table9 TableA Col5

    Table12 TableA Col6

    Table6 TableA Col9

    ..............................................................

    Table21 TableC Col1

    Table35 TableC Col4

    Table14 TableC Col5

    In order to fill the TableA, I have to join Table1, Table9, Table12, Table6 and to put the result of the join in Col3, Col5, Col6, Col9 of the TableA. The value of one column from each table to be joined is put in result table. The columns on which the tables are joined and the column from joined table that is put in result table is known at design time.

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

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