2 Replies Latest reply on Jul 12, 2018 11:23 AM by GreggSmith

    Special Characters in table.fieldname escaping WHEN statements

    JBrist1 Rookie

      We have a couple characters within a field for our Survey's in our ticketing system. This is causing our data model to escape a 'CASE WHEN' SQL statement we are mapping out. I presume it is the " / " and the single quote in " don't " that is the cause of the early escapes. I tried changing = to LIKE with out success. Is there a wildcard I can put in place or a regex like [/] or ['] that I can use?

       

       

      CASE

           WHEN ANSWER.ANSWERTEXT = 'Extremely helpful/willing to assist' THEN 'Extremely helpful'

          WHEN ANSWER.ANSWERTEXT = 'Very helpful/willing to assist' THEN 'Very helpful'

          WHEN ANSWER.ANSWERTEXT = 'Don't know / not applicable' THEN 'Don't know'

      ELSE 

          ANSWER.ANSWERTEXT

      END