4 Replies Latest reply: Apr 11, 2014 7:00 AM by vijeta sharma RSS

    Query help

      Hi Team,



      I just need help in Query..



      select tin,saleschannel,bookingsource,userid,seats,value,


      when saleschannel='Online' and (userid is null  or userid not like '%RB:MOBILE%')  then 'ONLINE WEB SALES'

      when saleschannel=online and userid like '%RB:MOBILE%' then 'MOBILE'

      when userid like '%RB:MOBILE%'  and userid not in ('RB:MOBILEWINDOWASAPP','RB:MOBILEADRIODAPP')  then 'WAP SALES'

      when userid like '%RB:MOBILE%'  and userid in ('RB:MOBILEWINDOWASAPP','RB:MOBILEADRIODAPP')  then  'APP SALES'

      when saleschannel='corporate' and bookingsource='corporate' then 'offline agents'

      when saleschannel='Corporate' and bookingsource='webdirect' then 'other offline agents'

      end as channel

      from temp_fact


      how can i write this Query in Qlik view