Solved

Xp_Sendmail not mailing Ascii

Posted on 2011-09-14
4
577 Views
Last Modified: 2012-07-21
I have a process that does a simple select. Once it does this select, it executes the XP_Sendmail to a .csv, but the problem is the .csv file needs to be in ascii format, its defaulting to uuincode

Any Help?

0
Comment
Question by:sysadmn_ascent
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 17

Expert Comment

by:dbaSQL
ID: 36542369
have you tried to use sp_send_dbmail?  it may not be a problem with xp_sendmail.  how are you creating the file?
http://dbaspot.com/sqlserver-server/369348-why-does-xp_sendmail-always-creates-using-unicode.html
0
 
LVL 21

Accepted Solution

by:
Alpesh Patel earned 500 total points
ID: 36542596
yes use the Database Mail. First configure it and use it
0
 
LVL 51

Expert Comment

by:Mark Wills
ID: 36546776
If you are running the query via the email then it makes little difference. The result will be unicode. At one point it used to generate Ansi / Ascii output but with the various upgrades it lost that ability and became unicode by default.

It has been some time since I last looked into it, and would have hoped there was an option by now. But cursory checks suggest it is still unicode output. I can check further if needed.

Possibly the best way is to generate the output and attach the results rather than attach the query. This is also true for dbmail.

Also, if using SQL 2005 and later, then most definitely look at the newer tools with dbmail - even though attached queries will still generate unicode, it is a far better tool (in my opinion).

But, execute the query first, generate the attachment, then attach that (and not the query).

If you can give us an example of what you are currently doing (and versions), we might be able to suggest the more appropriate solution.
0
 
LVL 51

Expert Comment

by:Mark Wills
ID: 38211609
Strange... Would have though dbasql might have earned some points given the accepted solution.
0

Featured Post

Is Your DevOps Pipeline Leaking?

Is your CI/CD pipeline a hodge-podge of randomly connected tools? You’ve likely got a tool to fix one problem & then a different tool to fix another, resulting in a cluster of tools with overlapping functionality. Learn how to optimize your pipeline with Gartner's recommendations

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.

724 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question