I am only a novice here on this list, but wouldn't
select cast('000001230.0' as DECIMAL(31,2)) from sysibm.sysdummy1
suffice to remove the leading blanks from your string and convert the value
to a DECIMAL? Or is your string too long?
"sujit" <yhkumars> schrieb im Newsbeitrag
news:a64cf821.0307151546.5a26964fposting.google.c om...> I am using Db2 8.1.
> I want to remove the leading zeros from a decimal that is cast
> to a char. Tried to use the STRIP function as per the
> recommendations in other posts related to this topic. However,
> I can't find this function in Db2 8.1. Wonder why it was removed.
> Couldn't find any equivalent function in Db2 8.1 to achieve
> the same result. LTRIM removes only leading blanks.
> STRIP was a useful function where you could specify
> the character to remove.
> db2 => select STRIP(CHAR(DECIMAL(VOLUME,31,2)),'L','0') from
> select STRIP(CHAR(DECIMAL(VOLUME,31,2)),'L','0') from i_item_master
> SQL0440N No authorized routine named "STRIP" of type "FUNCTION"
> compatible arguments was found. SQLSTATE=42884
> db2 => select ROUTINENAME from syscat.routines where ROUTINESCHEMA
> like '%SYSFUN%' and ROUTINENAME like '%STRIP%'
> 0 record(s) selected.
> Any other workarounds to this problem ?