• Phil Parkin (1/5/2014)


    Sowbhari (1/3/2014)


    If you can change the stored procedure to output as a concatenated string of the required columns data delimited with "," for the respective customer then you can write to CSV directly by defining flat file connection manager.

    If Excel is the required output format then you can acheive this using the derived column transformation.

    The headline idea here is that you define your flat file connection as having only a single column and then do all of the work to concatenate your columns and delimiters before this, all in a single column.

    Your single 'column' can thus contain a dynamic number of 'real' columns and delimiters and SSIS should be happy.

    The final comment about Excel is not correct - you cannot switch a file from CSV to Excel format using a derived column transformation.

    Phil - Thank you for explaining with additional detail. I should have explained a little bit more rather just giving a high-level idea. Will make sure going forward to put as much as detail I can.

    On the excel part what I mean is not to switch a file from CSV to Excel rather than use derived column transformation to populate the conditional columns according to the customer.