Share via

Calculating column, query based on text

ez1138 1 Reputation point
2021-02-18T13:17:32.853+00:00

Hi, I have a number of columns that I would like to calculate a value in another columns based on certain text. For three individual columns, one for "Pass", "Fail", and "In Progress", I would like the query to count the number of columns that have pass are entered in and so forth for the others.

Developer technologies | Transact-SQL
Developer technologies | Transact-SQL

A Microsoft extension to the ANSI SQL language that includes procedural programming, local variables, and various support functions.


1 answer

Sort by: Most helpful
  1. EchoLiu-MSFT 14,626 Reputation points
    2021-02-19T06:48:44.053+00:00

    Could you please share us your table structure (CREATE TABLE …) and some sample data(INSERT INTO …)
    along with your expected result? So that we’ll get a right direction and make some test.

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.