1 Reply Latest reply on Feb 4, 2015 5:39 PM by Gianni Ceresa

    Expected CHAR got NUMBER

    mariita

      I'm getting an error (ORA-00932: inconsistent datatypes: expected CHAR got NUMBER) from the formula below. Which part of this formula is expecting a CHAR?

       

      CASE

           WHEN "Enrolment - College"."F Language Preferred Measures"."Preferred Language French (#)" = 0 THEN 'All English'

           WHEN "Enrolment - College"."F Language Preferred Measures"."Preferred Language English (#)" = 0 THEN 'All French'

           ELSE "Enrolment - College"."F Language Preferred Measures"."Preferred Language French (#)" / "Enrolment - College"."F Language Preferred Measures"."Preferred Language English (#)"

      END

        • 1. Re: Expected CHAR got NUMBER
          Gianni Ceresa

          What the error means is that your column is a CHAR (or VARCHAR) mainly because the first options of your CASE WHEN return a text value, but then you have a division returning a number. So you need to choose (a) change the first 2 rows to a number or (b) CAST the result of the division to a char/varchar.