SQL query change font color based on value

  • Good Morning.

    I made a view with select in SQL.

    I need the negative numbers to be in green color, and the positive ones in red when I run the view .

    It's possible to make it through the view query?

    Thanks

  • In SSMS, that is not possible – it is seen as a query tool, not a presentation tool.


  • Thanks

  • ograndioso wrote:

    Good Morning. I made a view with select in SQL. I need the negative numbers to be in green color, and the positive ones in red when I run the view . It's possible to make it through the view query?

    Thanks

    Are you sending output of the query to someone else?

    --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)

  • Hi

    No its just for me analyze.

    Thanks

  • You could paste the results into Excel and colour the results with an Excel formula.

  • Jonathan AC Roberts wrote:

    You could paste the results into Excel and colour the results with an Excel formula.

    Or run the queries direct from Excel using PowerQuery.


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

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