miércoles, 26 de noviembre de 2014

SSIS exporting SQL query result to txt file

1. Create OLE DB Source, connect to data source.
2. Create Execute SQL Task, to get the value of the PATH parameter. 
3. Create Script Task to pass the value to the TXTFILEDIR variable. 
4. Create OLE DB Source to load que data set.
5. Create Flat File Destination to export the data set to txt file.


Create OLE DB Source


Create Variables


Create Execute SQL Task




  • configuring 




  • include result values on variables



  • edit breakpoints




  • testing



  • debugging



Create Script Task  & configuring


  • including variables on script list



  • editting script



Script Update date query

Script Task


Create OLE DB Source



  • configuring



alternativa usando variable





Create Flat File Connection 

  • configuring






Create Flat File Destination 

  • configuring




Create File Connection Manager


Create SMTP Connection Manager