Decimal values in DB2
September 10, 2004 9:26 AM
Subscribe
[DB2/SQLFilter] How do I cast a value of type DECIMAL(19,4) to a VARCHAR so that it has no leading zeroes, and only two digits after the decimal point? CHAR(DECIMAL( x(19,2) )) produces leading zeroes.
posted by Space Coyote to computers & internet (2 comments total)
TRIM(LEADING '0' FROM CHAR(DECIMAL( x(19,2))))
posted by ChasFile at 11:57 AM on September 10, 2004