March 11, 2010 at 9:00 pm
In SQL2000 I have package which in the end uses XP send mail to email the results of select queries as a CSV file.
Upgrading to 2005, I have updated the package as necessary to use database mail, but the CSV file that gets emailed puts the query results all in one column with the commas rather than actually delimiting into separate columns, I do have @query_result_separator = ','
Any ideas what the issue might be?
March 14, 2010 at 3:50 pm
Ok - I finally found a solution to this, to get Excel to open up the CSV in separate columns, I changed the separator to a tab.
@query_result_separator = 'tab', ---- tab separated where tab is the tab key, not the word Tab
March 15, 2010 at 10:43 am
Hi,
You can use the sp_makewebtask sp, with this s.p. you can generate a HTML file or Excel file (just changing then extension of the file to .xls),
try this:
sp_makewebtask @outputfile = 'youfile.xls'
, @query = 'Select * from youtable'
, @colheaders =1
, @resultstitle='Title of your report'
Sebastián Rodríguez R.
Licenciado en Informática de Gestión
sebas_rod@hotmail.com
(569) - 98626471
March 16, 2010 at 7:44 am
Thanks - will give this a try as well
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply