troubleshooting Question

Simple Export SQL 2005 View to a email CSV file

Avatar of binaryman101
binaryman101Flag for United States of America asked on
Microsoft SQL Server 2005
4 Comments1 Solution632 ViewsLast Modified:
I have a SQL script that I would like to send the file in CSV instead of TXT  I have attached the following code.  Am asking it to do something that it can not do?
EXEC msdb.dbo.sp_send_dbmail
 
@profile_name = 'U4 Notifications.com'
,@recipients = 'test@test.com'
,@subject = 'Circuits missing a CLLI Code - Process Z4026 - "Garbage man cometh"'
,@attach_query_result_as_file = 1
-- can go to 32767 for query width
,@query_result_width = 32767
,@body_format = 'TEXT'
,@body = 'blah blah blah test message
 
'
,@append_query_error = 0
,@exclude_query_output = 0
,@query_no_truncate = 0
,@query = 'SELECT ANI = Left(ANI,12) FROM [Billing Automation Processes].dbo.[Z4026 - Circuits missing CO information]'

Open in new window

ASKER CERTIFIED SOLUTION
MonkeyPushButton

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 4 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros