0

I am struggling with a common error... We are trying to capture several variants of string results and convert them to a single text word 'Negative'

    ,(CASE WHEN max(MR_RNATest.OBSVALUE) like '%not%detected%' 
         **OR max(MR_RNATest.OBSVALUE) like '%Non%Detected%%'**
         OR max(MR_RNATest.OBSVALUE) like '%n%ive%'
         OR max(MR_RNATest.OBSVALUE) like '%<%'
         OR max(MR_RNATest.OBSVALUE) = 'N'
         OR max(MR_RNATest.OBSVALUE) LIKE '%ND%'
     THEN 'Negative'....

Conversion failed when converting the varchar value 'HCV Non Detected ' to data type int.

I've reviewed multiple topics online but I couldn't understand how to adapt them to fit my case when statement. Please help :)

Thanks!

Kate
  • 1

0 Answers0