3 Replies Latest reply: Sep 1, 2013 11:37 AM by Charles Crous RSS

    Case statement when loading from Excel

    Simon Brown

      Hi folks, been a while since using QV and need a refresher;  I'm loading from Excel and need something similar to a CASE & LIKE statment and can't remember the exact syntax.  I'm looking for something similar to below when loading from Excel (note Dept field is not present in the table I'm loading)

       

      Dept =

           CASE

                WHEN user LIKE 'fi%' THEN 'Finance'

                WHEN user LIKE 'sm%' THEN 'Sales&Mktg',

                ELSE 'Other',

           END,

       

       

      Cheers