Subject | Re: [firebird-support] formatting a number |
---|---|
Author | Milan Babuskov |
Post date | 2005-04-27T08:34:31Z |
Grant Brown wrote:
padnum = your_integer;
while (strlen(padnum) < 7) do
padnum = '0' || padnum;
--
Milan Babuskov
http://fbexport.sourceforge.net
http://www.flamerobin.org
> In FB1.5 how can I format a number into a string with a fixed number ofdeclare variable padnum varchar(7);
> leading zeros inside of a stored procedure ?
>
> for example if the number is 10 then after formatting it would be a
> string with a value of 0000010
padnum = your_integer;
while (strlen(padnum) < 7) do
padnum = '0' || padnum;
--
Milan Babuskov
http://fbexport.sourceforge.net
http://www.flamerobin.org