From: Claudio V. C. <cv...@us...> - 2002-07-30 06:30:11
|
> -----Original Message----- > From: fir...@li... > [mailto:fir...@li...]On Behalf Of Andrea > Chiado' Piat > Sent: Lunes 29 de Julio de 2002 13:56 > > and it is right but fields subftest1 and subftest2 are 10 char lenght so > when in my application I do subftest1+subftest2 Do you mean subftest1 || subftest2, right? We don't support the "+", the ANSI operator is "||". > I have > > 01 23 > and not 0123 > > Probably results fields are initialized as varchar(field lenght) and then > filled with a null terminated string. No. But this is problem that comes from the time the function was done originally. It was an ASCII thing, not able to tackle international charsets at all. It was used for internal tasks only. But in general terms, substring seems to work okay. The problem is concatenation: it currently doesn't follow the ANSI-SQL specification that has detailed rules to mix char and varchar. > It is not possible inizialize field as CHAR(len of FOR clause) in new > firebird versions since we know the lenght we want return string? I don't think your suggestion applies at all. We only know there's a divergence WRT the standard. Either substring and/or concatenation should be polished. > All database I worked with (DB2, ORACLE, SQL) returns exact > lenght so I have > a lot of applications to convert to firebird but a lot of line of code to > adjust If I remember well, char will always produce that effect, so the correct case to fix is when varchars are involved. C. |