| Author |
Topic |
|
dwdwone
Yak Posting Veteran
71 Posts |
Posted - 2011-12-22 : 14:07:17
|
| I want to set a column in a query (not a report) to red IF a condition exists. Can this be done? If yes, how can I go about it?Thanks!Dan |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
dwdwone
Yak Posting Veteran
71 Posts |
Posted - 2011-12-23 : 00:20:05
|
| Well, for example, let's take a very simple query likeSELECT OrderID, CustomerID, OrderTime FROM ORDERSLet's say I wanted all results in the OrderTime column to be displayed with a yellow background. Can this be done? |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-12-23 : 01:15:20
|
| it can be done. But not in query editor. Color,Format etc are presentation related properties and only front end applications/tools will have ability to do it. So depending upon whats your front end tool, you've to add the logic to implement it there.------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
X002548
Not Just a Number
15586 Posts |
Posted - 2011-12-23 : 08:55:18
|
| Well...not to disagree...but my point was that you CAN use T-SQL to generate HTML Formatted code and apply what ever you want and then pass it to the front endI once created a Rules table that held thos "Properties" for certain conditions and passed that back to the applicationI'm all for taking Logic out of the hands of the front end developersask for data...display it...request a modificationThat's itin a perfect worldBrett8-)Hint: Want your questions answered fast? Follow the direction in this linkhttp://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspxWant to help yourself?http://msdn.microsoft.com/en-us/library/ms130214.aspxhttp://weblogs.sqlteam.com/brettk/http://brettkaiser.blogspot.com/ |
 |
|
|
dwdwone
Yak Posting Veteran
71 Posts |
Posted - 2011-12-25 : 17:17:37
|
| Unfortunately, II don't have a fronr end tool. I wish I did but I'm just an amateur with some SQL experience, and our system does not allow access to the application, just the query editor. |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-12-25 : 23:19:06
|
quote: Originally posted by dwdwone Unfortunately, II don't have a fronr end tool. I wish I did but I'm just an amateur with some SQL experience, and our system does not allow access to the application, just the query editor.
Then where are users viewing the data? directly from query editor?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
dwdwone
Yak Posting Veteran
71 Posts |
Posted - 2011-12-26 : 09:40:00
|
| The end users normally interact the data througth the application. Customer queries are viewed directly through the query editor. |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-12-26 : 11:24:41
|
quote: Originally posted by dwdwone The end users normally interact the data througth the application. Customer queries are viewed directly through the query editor.
for end users do it in application.------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
dwdwone
Yak Posting Veteran
71 Posts |
Posted - 2011-12-26 : 12:25:50
|
| I cut my teeth on the Apple IIe in 1984 and RBase in the late 90s, then wrote several in-house apps through necessity. But I am still just a well practised amatuer. Much to the chagrin of our application provider, who likes to keep things mysterious. |
 |
|
|
|