Execute SQL Task Result to flat file using SSIS 2008
I have an Execute SQL Task on my Control Flow Window. The result (single row) from the execute SQL task goes to a INT32 variable called 'ResultMessageID' How do I write this Result Message ID to a flat file? I am trying to do it as follows: In the Control Flow window, I added a DataFlow task and connected the Execute SQL task to the Data Flow task. Now I double click the Data Flow Task which opens the Data Flow tab window. I drag a Derived Column on to the Data flow Tab window. Now I double click the Derived Column and get a message popup: "This column has no available input column. Do you want to continue editing the available properties." Question 1: How do I connect the ResultMessageId variable as the input to this Derived Column? Question2: Do I need to configure the derived Column so as to add new column that converts incoming int32 to string which would then be mapped to flat file? Thanks.
May 31st, 2011 5:55pm

The problem with your attempt is that there is no "row generator" in the Data Flow. You can attempt to add columns all you want, but there aren't any rows to add them to. What may work (depending on what's in the SQL statement) is to copy the statement out of the Execute SQL Task, and place it inside an OLE DB Source on the Data Flow, and follow that up with a Flat File Destination. Can you try that? Talk to me now on
Free Windows Admin Tool Kit Click here and download it now
May 31st, 2011 6:04pm

You may skip the SQL task and put the SQL query directly into a OLE DB Source in a Data Flow task by setting the Data Access Mode to SQL command and link it to the flat file destination. HTH.
June 1st, 2011 12:27am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics