I am trying to cast a Decimal datatype to Varchar using
SELECT cast(char (OUTSTANDINGBAL) as varchar (30))
FROM CREDITTable;
and i get the results as
000000000000012.250
Decimal data type is defined as decimal(18,3) on the CREDITTable.
I need to avoid the leading zeros and get the 12.250 to insert into anothe table.
Is there any way I can do this?
I looked through most of the functions db2 has but it didn't get me anywhere.
I would really apprecaite it if you could forward any examples...
thanks
faris