Hello,We are sending some csv file to a third party using sp_send_dbmail. This is working fine but I have an issue with certain account which are using Cyrillic or uncommon characters (like Turkish). The result of the query is correct but the csv file not (???? for Cyrillic and blank or space for Turkish) .I modify sp_send_dbmail to allow ANSI export as explained in some posts and that seems to be ok with Turkish.But I have stil the issue with CyrillicAny idea ? thanks !!!!!!Here the call to the store proc DECLARE @OrderNumber char(10) DECLARE @sub VARCHAR(100)DECLARE @qry VARCHAR(1000)DECLARE @msg VARCHAR(250)DECLARE @query NVARCHAR(max)DECLARE @query_attachment_filename NVARCHAR(max)Select @OrderNumber = Substring(SAMPLESBROCHURESID,5,8) from sysdba.SAMPLESBROCHURES where SAMPLESBROCHURESID= @SamplesBrochuresIDSELECT @sub = 'Order : ' + @OrderNumberSELECT @msg = 'Please refer to the attached spread sheet for the report.'SELECT @query = 'SET NOCOUNT ON; PRINT ''sep=;''; select * from CRM.dbo.Orders ' SELECT @query_attachment_filename = 'Order_' + @OrderNumber + '.csv'EXEC msdb.dbo.sp_send_dbmail@profile_name = '280',@recipients = 'toto@gmail.com',@body = @msg,@subject = @sub, @query = @query, -- @exclude_query_output = 1,@query_attachment_filename = @query_attachment_filename,@attach_query_result_as_file = 1,@query_result_header = 0,@query_result_width=32767,@ansi_attachment = 1,@query_result_separator = ';'; -- @query_result_no_padding =0;
↧