How to give red color to rows when Employee active status is zero?

Ned Stark1003 1 Reputation point
2022-04-27T07:04:06.703+00:00

I have to give red to the rows where employee active status is zero in SQL

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
13,351 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Olaf Helper 43,246 Reputation points
    2022-04-27T07:28:01.753+00:00

    SQL Server as it provides data, not more.
    "Coloring" a displayed result is the task of the frontend and you didn't mentioned, which one you use.

    0 comments No comments

  2. Seeya Xi-MSFT 16,461 Reputation points
    2022-04-27T09:00:03.233+00:00

    Hi @Ned Stark1003 ,

    As Olaf mentioned, > SQL Server as it provides data, not more.
    I have put a statement below about selecting the user process which contains detailed information such as SPID, Login. Also you can use sp_who2.

    SELECT * FROM sys.dm_exec_sessions WHERE is_user_process = 1;  
    

    Hope this could give you some help.

    Best regards,
    Seeya


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments