1 Reply Latest reply: Mar 23, 2013 3:31 PM by 998760 RSS

    How to use CASE in an update ?

    998760
      I did so and an error happened:

      UPDATE TB_FUNCIONARIO SET NIVEL =
      CASE WHEN CARGO = 'PROGRAMADOR' AND SALARIO BETWEEN 4000 AND 8000 THEN 'PLENO'
      WHEN CARGO = 'PROGRAMADOR' AND SALARIO <= 2000 THEN 'JUNIOR'
      ELSE 'SENIOR' END

      how to solve ?

      Edited by: 995757 on 23/03/2013 13:29