Solved

HTML Conditional Formatting dbmail

Posted on 2009-05-04
7
581 Views
Last Modified: 2012-05-06
I have a stored proc on sql 2005 server that sends out emails in html format.  It gets its data from a database view on the same server.  Everything currently works great and all emails get sent, however I would like to put some of the fields that it retrieves from my view in red if a condition is met.  

How can this be done?
0
Comment
Question by:H-SC
  • 4
  • 3
7 Comments
 
LVL 41

Expert Comment

by:ralmada
ID: 24295264
0
 
LVL 41

Expert Comment

by:ralmada
ID: 24295287
And for conditional formatting, check this other one:
http://www.arstdesign.com/articles/avs/conditionalformatting.html
 
0
 
LVL 1

Author Comment

by:H-SC
ID: 24295302
ralmada,

I currently have the email formated as html ad is working great.  I need to conditionally format that html to have the text be red if a condition is met on the field that gets pulled from the view.
0
Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

 
LVL 1

Author Comment

by:H-SC
ID: 24295321
ok, just got your last posting after I posted my reply.  I will take a look at the link...
0
 
LVL 41

Accepted Solution

by:
ralmada earned 500 total points
ID: 24295358
0
 
LVL 1

Author Comment

by:H-SC
ID: 24295459
ralmada,

I am going to go with the last one....  Many thanks for your help with this one.
0
 
LVL 1

Author Comment

by:H-SC
ID: 24296209
ralmada,
Applied the code from the last site that you sent and worked perfect!  thanks for sending me in the right direction
0

Featured Post

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

790 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question