Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

CAST issue

jawilliDec 16 2010 — edited Dec 16 2010
I 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;
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 13 2011
Added on Dec 16 2010
12 comments
442 views