• 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.

    If you haven't even tried to resolve your issue, please don't expect the hard-working volunteers here to waste their time providing links to answers which you could easily have found yourself.