title: Sql Query results to CSV to a specified file path after stored procedure execution
body: <p>I'm trying to execute a stored procedure (which i know works) in T-SQL that then gets those results into a CSV file and puts that file into a directory.  I'm not sure how to formulate that query, exactly though.  Here's what i've tried thus far to no avail:</p>
  
  <pre><code>EXECUTE CLR_ExportQueryToCSV @QueryCommand = 'execute databaseName.dbo.StoredProcedureName',
                            @FilePath = 'C:\Directory',
                            @FileName = '\FileToExport.csv',
                            @IncludeHeaders = 1
  </code></pre>
  
  <p>I realize CLR_ExportQueryToCSV doesn't exist.  Is there any system stored procedure that will do what i'm wanting?</p>