title: writing procedure output to file with column header
body: <pre><code>declare @sql varchar(8000)
  select @sql = 'bcp "exec "'+@dbname+'"..myproc" queryout "'+@filepath+'text1.txt" -c -t "|" -r \n -T -S' + @@servername
  exec master..xp_cmdshell @sql
  </code></pre>
  
  <p>I'm using above query to write <code>myproc</code> procedure output to pipeline delimited text file. It is working fine except output file doesn't have column header. </p>
  
  <p>How to add column header without making any change inside procedure code.</p>