hilaquita Posted March 27, 2017 Share Posted March 27, 2017 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) POBTENIDOFROM 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 More sharing options...
mlopez_1 Posted March 30, 2017 Share Posted March 30, 2017 You don't need to cast fields, Jaspersoft Studio automatically maps these field to BigDecimal and treat it like a decimal number.Regards Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now