5 Replies Latest reply: Jun 20, 2012 11:46 AM by Rich Hemmings RSS

    Case statement in QlikView

    Shubham Kumar

      Hi,

       

      Could any one help me with  converting SQL case statement in QlikView Code.

       

      ProviderGroupName,

                          (Case

                                When A.Region in('L','4 - Lake','Lake and Polk County') Then 'Lake and Polk County'

                                     When A.Region in('O','1-Orlando','Orlando') Then 'Orlando'

                                     When A.Region in('T','2 - Tampa','Tampa') Then 'Tampa'

                                     When A.Region in('3 - South Florida','South Florida') Then 'South Florida'

                                     When A.Region in('J','5-JAX','Jacksonville') Then 'Jacksonville'

                                     ELse isnull(A.Region,'') END) AS Region,

                          (Case

                                     When A.Region in('L','4 - Lake','Lake and Polk County')  Then 5

                                     When A.Region in('O','1-Orlando','Orlando') Then 1

                                     When A.Region in('T','2 - Tampa','Tampa') Then 2

                                     When A.Region in('3 - South Florida','South Florida') Then 3

                                     When A.Region in('J','5-JAX','Jacksonville') Then 4

                                     ELse 6 END) AS DisplayOrderRow,

       

      Thanks  & Regards,

       

      Shubham