由买买提看人间百态

topics

全部话题 - 话题: tablehtml
(共0页)
B*********L
发帖数: 700
1
It works now. I add this.
set @tableHTML = REPLACE( @tableHTML, '<', '<' );
set @tableHTML = REPLACE( @tableHTML, '>', '>' );
set @tableHTML = REPLACE( @tableHTML, '&', '&' );
B*********L
发帖数: 700
2
来自主题: Database版 - 问个 sp_send_dbmail 的问题
总算可以了:
DECLARE @tableHTML NVARCHAR(MAX)
SET @tableHTML =
N'
SET NOCOUNT ON;
PRINT ''name NAME_html
''
SELECT [name]
,''http://xxxx.com/Report.aspx?ID='' + [name] + ''>'' + [name] + ''''
,''
''
FROM table WITH (NOLOCK)
' ;
EXEC msdb.dbo.sp_send_dbmail @profile_name = 'RF_Performance'
, @recipients = 'l*****[email protected]'
, @subject = 'test'
, @importance = 'High'
, @query = @tableHTML
, @exclude_query_output = 1
, @query_no_truncate = 0
,... 阅读全帖
(共0页)