SQL SERVER EMAIL HTML REPORT
E.DIN Editor • April 22, 2020
if(@tst > 0 )
begin
--write the email text
declare @etxt varchar(max)
set @etxt=''
set @etxt=@etxt+'<html>
begin
--write the email text
declare @etxt varchar(max)
set @etxt=''
set @etxt=@etxt+'<html>
<style type="text/css">
body {font-family:Helvetica;font-size:11pt;}
th {background-color:Navy;color:white;font-weight:bold;font-size:12pt;}
th.grid {width=100px;border:1px solid silver;font-weight:normal;font-size:10pt;}
td.grid {border:1px solid silver;font-size:10pt;}
</style>
body {font-family:Helvetica;font-size:11pt;}
th {background-color:Navy;color:white;font-weight:bold;font-size:12pt;}
th.grid {width=100px;border:1px solid silver;font-weight:normal;font-size:10pt;}
td.grid {border:1px solid silver;font-size:10pt;}
</style>
<table width="900" border="0">
<tr>
<th align="left" style="width:900px;">My Company Reporting Services</th>
</tr>
<tr>
<th align="left" style="width:900px;">My Company Reporting Services</th>
</tr>
<tr>
<td>
<span style="font-weight:bold;font-size:14pt;">Daily My Data Reports</span><br />
Please direct any questions or concerns to our help desk (help@myDomain.com).<br />
Thank you.</i>
<br />
<br />
<b>Please click the link(s) below to view current My data loaded to the system:</b><br />
<br />
<a href="https://reporting.mydomain.com/ReportViewerHTML5.aspx?ReportFile=/Entity/My%20Data.trdx&EntityID=01&ID=1982973293">Report Title 1</a>
<br />
<a href="https://reporting.mydomain.com/ReportViewerHTML5.aspx?ReportFile=/Entity/My%20Data.trdx&EntityID=01&ID=1942447321">Report Title 2</a>
<br />
<a href="https://reporting.mydomain.com/ReportViewerHTML5.aspx?ReportFile=/Entity/My%20Data.trdx&EntityID=01&ID=1386904886">Report Title 3</a>
<br />
<a href="https://reporting.mydomain.com/ReportViewerHTML5.aspx?ReportFile=/Entity/My%20Data.trdx&EntityID=01&ID=1982004289">Report Title 4</a>
<br />
<br />
<b>Reporting Workflow record counts:</b><br />
<a href="https://reporting.mydomain.com/ReportViewerHTML5.aspx?ReportFile=/Billing/ReportWFData.trdx&lookback=30">Reporting Workflow</a>
<br />
<b>Reporting Fallouts:</b><br />
<a href="https://reporting.mydomain.com/ReportViewerHTML5.aspx?ReportFile=/Billing/ReportingFallouts.trdx&showArchived=N">Reporting Fallouts</a>
</td>
</tr>
<td>
<span style="font-weight:bold;font-size:14pt;">Daily My Data Reports</span><br />
Please direct any questions or concerns to our help desk (help@myDomain.com).<br />
Thank you.</i>
<br />
<br />
<b>Please click the link(s) below to view current My data loaded to the system:</b><br />
<br />
<a href="https://reporting.mydomain.com/ReportViewerHTML5.aspx?ReportFile=/Entity/My%20Data.trdx&EntityID=01&ID=1982973293">Report Title 1</a>
<br />
<a href="https://reporting.mydomain.com/ReportViewerHTML5.aspx?ReportFile=/Entity/My%20Data.trdx&EntityID=01&ID=1942447321">Report Title 2</a>
<br />
<a href="https://reporting.mydomain.com/ReportViewerHTML5.aspx?ReportFile=/Entity/My%20Data.trdx&EntityID=01&ID=1386904886">Report Title 3</a>
<br />
<a href="https://reporting.mydomain.com/ReportViewerHTML5.aspx?ReportFile=/Entity/My%20Data.trdx&EntityID=01&ID=1982004289">Report Title 4</a>
<br />
<br />
<b>Reporting Workflow record counts:</b><br />
<a href="https://reporting.mydomain.com/ReportViewerHTML5.aspx?ReportFile=/Billing/ReportWFData.trdx&lookback=30">Reporting Workflow</a>
<br />
<b>Reporting Fallouts:</b><br />
<a href="https://reporting.mydomain.com/ReportViewerHTML5.aspx?ReportFile=/Billing/ReportingFallouts.trdx&showArchived=N">Reporting Fallouts</a>
</td>
</tr>
<tr>
<td style="border-top:1px solid black;text-align:right;">
<span style="font-weight:bold;font-size:10pt;">My Company Name, </span>
<span style="font-style:italic;font-size:10pt;">Maximizing Value in all we do</span>
</td>
</tr>
</table>
</html>'
<td style="border-top:1px solid black;text-align:right;">
<span style="font-weight:bold;font-size:10pt;">My Company Name, </span>
<span style="font-style:italic;font-size:10pt;">Maximizing Value in all we do</span>
</td>
</tr>
</table>
</html>'
set @etxt = replace(@etxt,'~BR~','<br />')
--send the email
declare @to varchar(2000)
set @to=@who
--send the email
declare @to varchar(2000)
set @to=@who
exec msdb.dbo.sp_send_dbmail
@profile_name='ReportingDB'
,@recipients=@to
,@copy_recipients='datasystems@mydomain.com'
,@subject=@msg
,@body_format='HTML'
,@body=@etxt
@profile_name='ReportingDB'
,@recipients=@to
,@copy_recipients='datasystems@mydomain.com'
,@subject=@msg
,@body_format='HTML'
,@body=@etxt
end
Title: Base64 Encoding With Simple Salt (and decoding)
XPCMD_SHELL Move & Load Data from Directory
***** My Valid Data Monitor **** XML OUT *** HTML EMAIL DELIVERY *****IF OBJECT_ID('tempdb..#tCustomerID') IS NOT NULL DROP TABLE #tCustomerID select distinct mm.CustomerID Into #tCustomerID from myDatabase..myTable (nolock) mm left join myDatabase.dbo.myOtherTable (nolock) mo on mm.refID = mo.id left join myDatabase.dbo.myOtherTableDetail (nolock) mod on mo.id = mod.myOtherTableid and mm.SearchValue = mod.SearchValue where mm.refID is not null and mm.quantity is not null and mod.SearchValue is nullIF Exists (Select 1 From #tCustomerID)BEGIN DECLARE @xml NVARCHAR(MAX)DECLARE @body NVARCHAR(MAX)SET @xml = CAST(( SELECT [CustomerID] AS 'td' FROM #tCustomerID ORDER BY CustomerID FOR XML PATH('tr'), ELEMENTS ) AS NVARCHAR(MAX))SET @body ='
'--SELECT @body exec msdb.dbo.sp_send_dbmail @profile_name = 'dbmailProfile' ,@recipients = 'usergroup@mydomain.com' ,@subject = 'My Valid Data Monitor' ,@body = @body ,@body_format = 'HTML'END
My Valid Data Monitor
CustomerID |
---|
Turn Up! Not every microphone has the same base volume for transmitting your voice through your computer to whoever or whatever is on the other end of the exchange. Some microphones have a higher volume as compared to others, and some microphones have a volume that is so low that the person on the other […]
The post How to Turn Up Mic Volume in Windows 10 – Appuals.com appeared first on TekPreacher.
'+@UNCPathAndLogTable+'