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.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Change Cell Color Based on Condition

Author  Topic 

Teaman
Starting Member

4 Posts

Posted - 2015-02-10 : 14:58:56
I have a table in which I would like to change the color of some of the cells based on a condition.
For Example:
ID Start End Downtime
1 2/9/15 13:28:41 2/9/15 13:28:46 #VALUE!
2 2/9/15 13:29:03 2/9/15 13:29:12 0:00:17
3 2/9/15 13:29:17 2/9/15 13:29:21 0:00:05
4 2/9/15 13:29:27 2/9/15 13:29:31 0:00:06

When the value of Downtime is greater than 0:00:10 I would like to have the background of that cell to be Red and its font bold.
How can you accomplish this in query?




Sam Smith

gbritton
Master Smack Fu Yak Hacker

2780 Posts

Posted - 2015-02-10 : 15:02:34
What are you using to view the results? Hint: you cannot change color of the output in SSMS, but you can in SSRS.
Go to Top of Page

Teaman
Starting Member

4 Posts

Posted - 2015-02-10 : 16:04:07
quote:
Originally posted by gbritton

What are you using to view the results? Hint: you cannot change color of the output in SSMS, but you can in SSRS.



I am sorry. I am newbie here. I thought I could do it in the query script!
Go to Top of Page

gbritton
Master Smack Fu Yak Hacker

2780 Posts

Posted - 2015-02-10 : 16:06:31
I'm afraid not! that is an application-level thing.
Go to Top of Page
   

- Advertisement -