CAST issue
jawilliDec 16 2010 — edited Dec 16 2010I have completed the below equivalent in both DB2 and SQL Server.
For some reason I am getting an ORA-25137 .
I basically need to divide a number by 24, convert to char, padd to 10 chars of zeros the rounded total. Then convert back to number for a function I have to write using this.
select
CAST(RPAD(CAST(ROUND((9999999999/24),10) AS CHAR(10)),10,'0') as integer)
from dual;