Dynamic column names at the destination

  • Hi All,

    How can I have the dynamic column names at the detination, My colums name chages every quater. I mean to say, the date should be added up with the column name, everytime I run the package.

    I have been looking at different articles but I could not find any which could resolve my problem.

    It would be great if any one could guide me.

    Thanks,

    Preensheen

  • Well, you can't. At least not with out-of-the-box SSIS.

    There are possibly some commercial add-ins that let you achieve this task.

    So basically, you are stuck with scripting. Either in a Script Task, or in T-SQL in an Execute SQL Task.

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • da-zero (10/5/2010)


    Well, you can't. At least not with out-of-the-box SSIS.

    There are possibly some commercial add-ins that let you achieve this task.

    So basically, you are stuck with scripting. Either in a Script Task, or in T-SQL in an Execute SQL Task.

    Can you please guide me best way by which I can achive the task accomplished.

  • What is the Business Intelligence tool you are using? SSRS or SSIS

  • preensheen (10/4/2010)


    Hi All,

    How can I have the dynamic column names at the detination, My colums name chages every quater. I mean to say, the date should be added up with the column name, everytime I run the package.

    I have been looking at different articles but I could not find any which could resolve my problem.

    It would be great if any one could guide me.

    Thanks,

    Preensheen

    You may find it simpler to store your data in a table that doesn't put each quarter in a separate column, but rather has a [quarter] column, and a pivot view on top of that table.

  • laksgovi (10/5/2010)


    What is the Business Intelligence tool you are using? SSRS or SSIS

    SSIS

  • getoffmyfoot (10/5/2010)


    preensheen (10/4/2010)


    Hi All,

    How can I have the dynamic column names at the detination, My colums name chages every quater. I mean to say, the date should be added up with the column name, everytime I run the package.

    I have been looking at different articles but I could not find any which could resolve my problem.

    It would be great if any one could guide me.

    Thanks,

    Preensheen

    You may find it simpler to store your data in a table that doesn't put each quarter in a separate column, but rather has a [quarter] column, and a pivot view on top of that table.

    So it is more likely that...I have to first pull all the quater values in a table and then pivot that table ...and once the table is ready..with all quaters...then start inserting the values which have to be..right?

  • Absolutely, the package flow would resemble as below:

    Original data --> Derived Column Task --> Pivot Task --> Destination

    Raunak J

  • Raunak Jhawar (10/5/2010)


    Absolutely, the package flow would resemble as below:

    Original data --> Derived Column Task --> Pivot Task --> Destination

    Hey thanks a lot. Working on it and let you know once I suceed.

Viewing 9 posts - 1 through 8 (of 8 total)

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