title: Export a text file from a SQL Stored Procedure
body: <p>I have a current process that exists in 2 MS Access databases that exports a text file.  This process takes place twice during the day, once during a automated process that triggers at a set time and the second is triggered by a user on the front-end of the application.  </p>
  
  <p>This is identical in both databases and now we are rewriting this application to a SQL server backend, c# winforms front-end.  Ideally I want the code to perform this export in one place so if I have to make a change I am only changing it once. </p>
  
  <p>The new version of this is to use SSIS packages to call stored procedures for the morning auto process and then have a front-end call to the same process.  </p>
  
  <p>Is there a way to export data to a text file from a stored procedure?  </p>
  
  <p>Thanks</p>