> I want to cast number to varchar and fill the leading characters with
> zeros. In oracle I can do "to_char(25, '0000')" and get as result
> "0025". Is there any similar solution for this in firebird?
> (If I just cast number to varchar (cast(25 as varchar(4)) I get char
Try something like:
select sright( '0000' || cast( 25 as varchar(4)), 4 ) from rdb$database;
or write an SP 'to_char()' which does it.
Note: you need to have the FB UDF definition for sright() (obviously)