How not to convert an exponential number to decimal?

0

I'm having the following problem:

I created a function to put the thousand point (s) in the values that it receives as parameter (VARCHAR2). This function receives integer values and values of type VARCHAR ('Some text'). When the value is not integer or is greater than 999 it returns exactly the value that entered. The problem is that when it receives an exponential number the function converts to VARCHAR and stops being expressed in exponential. Ex:

SQL> SELECT pontoMilhar2(1E-2) nTratado FROM dual;

Returns, 01. What should return was 1E-2 , because it is not greater than 999. As soon as you enter the function, the value is already 01.

CREATE OR REPLACE FUNCTION pontoMilhar2 (inValor IN VARCHAR2)
   RETURN VARCHAR2
IS
BEGIN
   IF isFloat (inValor) = 1
   THEN
      IF inValor > 999
      THEN
         RETURN pontoMilhar1(inValor);
      ELSE
         RETURN inValor;
      END IF;
   ELSE
      RETURN inValor;
   END IF;

   RETURN inValor;
END pontoMilhar2;

NOTE: I put this point in Milil1 because then it works perfect.

Question: Is there any input parameter that does not do this conversion ??

    
asked by anonymous 12.04.2017 / 19:56

0 answers