I have a table : For a test there can be multiple run/execution. Each run have a result. here for result column, 0 is fail and 1 is pass. I want to query –if all the run PASS for test, the OverallStatus is PASS –If all the run Faile for a test, the OverallStatus is FAIL –If some of them
Tag: switch-statement
SQL use CASE statement in WHERE IN clause
Is it posible to use case in where in clause? Something like this: DECLARE @Status VARCHAR(50); SET @Status=’published’; SELECT * FROM Product P WHERE P.Status IN (CASE WHEN @Status=’…