Subject 回复: Re: [firebird-support] how to get the same length result
Author Yang Jin
Thank Ivan's reply and thank you Ali also.
I find the lpad function in udf.
It need three is the source string;
second is the result length; third is the default string to fill the blank.for example, lpad('abc', 5, '3') = 'eeabc'.
Thanks again.



.com> 写道:
Yang Jin wrote:

> I want to get the same length varchar filed in table from procedure.The content of field is '1', '12 and '123';I want to get ' 1', ' 12' and '123'.I use cast(XX as varchar(3)), but result is dispoint.
> Who can tell me a useful method, TIA!
Firebird 1.5 nows ships with a version of ib_udf that includes
a "lpad" function. That function is exactly what you are
looking for. Take a look in the release notes for details.



Visit and click the Resources item
on the main (top) menu. Try Knowledgebase and FAQ links !

Also search the knowledgebases at


Technical support Computer technical support Compaq computer technical support Compaq technical support Hewlett packard technical support Microsoft technical support


Visit your group "firebird-support" on the web.

To unsubscribe from this group, send an email to:

Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



[Non-text portions of this message have been removed]