Subject Re: how to get the same length result
Author Ali Gökçen
Hi Jin,

select (case when substring(my3chars from 2 for 1)=''
then ' '||my3chars
when substring(my3chars from 3 for 1)=''
then ' '||my3chars
else my3chars end) as myrightjustified3chars
from mytable

Regards.

Ali

--- In firebird-support@yahoogroups.com, Yang Jin <ojinyang@y...>
wrote:
> hello,
> 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!
>
> jinyang
> regard
>