Color Particular Column

  • Hi

    I want to color particular column . If value is -ve then color should be red

    Thanks

  • Going to need more information, more specifically in which application do you require to colour this column?

    Azure Data Studio?

    SQL Server Management Studio?

    SSRS?

    PowerBI?

    Tableu?

    Grafana?

    Something else?

  • Hi

    In Sql Query or using Stored Procedure

    Thanks

  • That does not answer the question.

    Colouring a column is a visualisation issue, which is solved in the client not the query or stored procedure.

    What "client" do you need this visualisation in?

  • This needs to be done in the presentation layer.  SQL queries and stored procedures are the data layer, not the presentation layer.  You need to do this in SSRS, Tableau, or some other presentation software.

    Drew

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • jagjitsingh wrote:

    Hi

    In Sql Query or using Stored Procedure

    Thanks

    Such formatting can, indeed, be done in a query or stored procedure.  My "Morning Report" emails I get from the servers are proof of that.

    The thing is, it won't work in SSMS or Visual Studio because they're not setup for such a thing and that "thing" would be HTML encoding.  I only do it so that I can go straight from a stored procedure to an email without having to go through another application for formatting.

    That's not the best thing to do for production reporting code, though.  That type of formatting would be better left to a different application such as SSRS, Excel, Power BI, etc, etc.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply