Jump to content
Changes to the Jaspersoft community edition download ×

Error Invalid Number with Oracle 12c


hilaquita

Recommended Posts

Hi,

In the following SQL:
SELECT 
CAST(CASE WHEN F.ANTIGUEDAD < (SELECT PARLIMITE FROM PARAMETROS WHERE PARGRUPO = 'COND' AND PARORDEN = 4) 
    THEN (SELECT TO_NUMBER(PARVALOR) FROM PARAMETROS WHERE PARGRUPO = 'COND' AND PARORDEN = 4) 
    ELSE 
        CASE WHEN F.ANTIGUEDAD < (SELECT PARLIMITE FROM PARAMETROS WHERE PARGRUPO = 'COND' AND PARORDEN = 3) 
            THEN (SELECT TO_NUMBER(PARVALOR) FROM PARAMETROS WHERE PARGRUPO = 'COND' AND PARORDEN = 3) 
            ELSE 
                CASE WHEN F.ANTIGUEDAD < (SELECT PARLIMITE FROM PARAMETROS WHERE PARGRUPO = 'COND' AND PARORDEN = 2) 
                    THEN (SELECT TO_NUMBER(PARVALOR) FROM PARAMETROS WHERE PARGRUPO = 'COND' AND PARORDEN = 2) 
                    ELSE (SELECT TO_NUMBER(PARVALOR) FROM PARAMETROS WHERE PARGRUPO = 'COND' AND PARORDEN = 1) 
                END    
            END
    END AS FLOAT) POBTENIDO
FROM FORMCOBERTURA F 
JOIN BALANCENTN BN ON BN.FORMCOBERTURAID = F.ACBID AND BN.BCBAREA = 'R'
WHERE F.ACBID = '61001000091'
 
I want to get the data in decimal, use TO_NUMBER and CAST (XX AS FLOAT) but it does not work.
 
This query runs in ORACLE 12c and works normal, but when I execute it in JasperStudio 6.3, I get error ORA-01722: invalid number.
 
I really have no idea where the error is
Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...