Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 E-mail CSV File

Author  Topic 

dugoneill
Starting Member

11 Posts

Posted - 2010-03-11 : 21:08:16
In SQL2000 I have package which in the end uses sendmail 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 = ','

Thanks,

dugoneill
Starting Member

11 Posts

Posted - 2010-03-14 : 17:53:01
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
Go to Top of Page
   

- Advertisement -