EXEC MSDB.DBO.SP_SEND_DBMAIL
@PROFILE_NAME = 'NoReply Mail'
, @RECIPIENTS = 'chandra@gmail.com'
, @BODY_FORMAT ='HTML'
, @BODY = @body
, @SUBJECT = @subject
, @QUERY = @SQL
, @ATTACH_QUERY_RESULT_AS_FILE = 1
, @QUERY_ATTACHMENT_FILENAME = @query_filename
, @QUERY_RESULT_SEPARATOR = ' '
, @QUERY_RESULT_NO_PADDING = 1
, @EXCLUDE_QUERY_OUTPUT = 1
, @APPEND_QUERY_ERROR = 0
, @QUERY_RESULT_HEADER = 0
**当我收到附件时,我看到数据中的换行符(即第二行中显示的数据以及excel附件中的数据。如何避免这种情况?提前感谢。**