Re: QUESTION when format TO_CHAR(xxx,'0999')

From: Roy Brokvam <roy.brokvam_at_conax.com>
Date: Tue, 23 Mar 1999 18:41:15 +0100
Message-ID: <EqQJ2.346$Yk.2595_at_news1.online.no>


T.TAKAHASHI wrote in message <7d83ta$b2p$1_at_nw031.infoweb.ne.jp>...

[snip]

If you do:

select dump(to_char(rkhjy,'0000'))
from wmrokmpj;

,I think you will find a space in front of the 4-digit number. This is because to_char(a_number,format_string) makes space for a leading '-', in case a_number is negative.

To get rid of it, do:

select ltrim(to_char(rkhjy,'0000'))
from wmrokmpj;

Regards,

Roy Brokvam
roy.brokvam_at_conax.com Received on Tue Mar 23 1999 - 18:41:15 CET

Original text of this message