Subject Re: [firebird-support] formatting a number
Author Milan Babuskov
Grant Brown wrote:
> In FB1.5 how can I format a number into a string with a fixed number of
> 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

declare variable padnum varchar(7);
padnum = your_integer;

while (strlen(padnum) < 7) do
padnum = '0' || padnum;

Milan Babuskov