Answer the question
In order to leave comments, you need to log in
How to add a query if the condition in the case is true?
(SELECT c.ClassifierGroupId FROM ClassifierGroup c WHERE c.ClassifierId=
(CASE WHEN @SupplierContractTypeClassifierGroupId = 0 THEN
(2)
ELSE
(159)
END)
)
AND c.ClassifierGroupId = @SupplierContractTypeClassifierGroupId
if c.ClassifierId = 2
Answer the question
In order to leave comments, you need to log in
SELECT ClassifierGroupId
FROM ClassifierGroup
WHERE
(CASE WHEN @SupplierContractTypeClassifierGroupId = 0 THEN
IIF((ClassifierId=2) AND (ClassifierGroupId = @SupplierContractTypeClassifierGroupId), 1, 0)
ELSE
IIF(ClassifierId=159, 1, 0)
END) = 1
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question