2 Replies Latest reply: Aug 19, 2016 11:12 AM by Simy Joseph RSS

    Sql "LIKE" Issue in a Sql select Load Statement In Qlik Sense?

    Simy Joseph

      Hello,

       

      I am trying to load columns from our database to Qlik sense. Some of the columns will be derived columns.

      For eg : In my sql statement if I have something similar to this

       

      Query: CASE WHEN Status LIKE 'Rejected*' THEN 'Rejected' ELSE 'Accepted' END AS CurrentStatus

       

      Output: This column will show "Rejected" for every line regardless of the Status  .

       

      If I change my query to

       

      Query: CASE WHEN Status = 'Rejected' THEN 'Rejected' ELSE 'Accepted' END AS CurrentStatus

       

      Output: It derives the right value for each line.

       

      I have tried using IF Statement instead of CASE and that also doesnt seem to work.

       

      Is there anything that I am missing? Any help/guidance would be appreciated!

       

      Thanks!!!