Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
Robowski
Posting Yak Master
101 Posts |
Posted - 2013-11-12 : 10:01:37
|
Hi,Anyone know of you can hard code sql for the text to be bold, underlined, certain color etc when using sp_send_dbmail?Like body = BoldCheers |
|
TG
Master Smack Fu Yak Hacker
6065 Posts |
Posted - 2013-11-12 : 10:26:36
|
text formatting is a front end display consideration. Sql has nothing to do with it and does not provide any support that sort of thing. However, you can certainly hard code in "markup" language that your front end is aware of. For instance if the output will be part of an html page you could hard code html markup language and concatenate that along with your database values.For instance to generate an html page you could:select '<!DOCTYPE HTML><html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>' + title + '</title> </head> <body> <div class="page"> <a href="http://go.microsoft.com/fwlink/?LinkID=209092" title="microsoft.com/web" > <p><img src="iis-8.png" alt="Microsoft Internet Information Services 8.0" class="hero" /></p> <p><img src="msweb-brand.png" alt="Microsoft.com/Web" class="url" /></p> <p><img src="w-brand.png" alt="Microsoft Windows" class="brand" /></p> </a> </div> </body></html>'from myTitleTable Be One with the OptimizerTG |
|
|
Robowski
Posting Yak Master
101 Posts |
Posted - 2013-11-12 : 10:33:39
|
Thats great thanks! |
|
|
|
|
|