Re: String concatenation limits...?
Posted in 2000
Paul, TRIM() returns VARCHAR. And concatenating VARCHAR with CHAR makes the result a VARCHAR which again is limited to 255 chars. There was a bug in implementing the ANSI VARCHAR type. The bug was present in 7.24.UC1 and prior versions and made VARCHAR behaving like CHAR thus not being limited to 255 chars. I don't know about UC2 and UC3 but 7.24.UC4 fixed this bug (thus limiting VARCHAR to 255 chars) and all of a sudden we had to rewrite a lot of our SPs. Regards, Cristian. Paul Harman wrote: > > Paul Harman <paul@kasterborus.demon.co.uk> wrote in message > news:cs9r4.334$7R.4684@news.colt.net... > > Apparently, TRIM returns a VARCHAR so you can't trim a string that will > turn > > out to be longer than 255 characters. Who's stupid idea was that? > > Ignore that. > > I've removed all calls to TRIM() from my stored procedures but I *still* get > error 881 [*] thrown when concatenating CHARs and VARCHARs of differing > lengths into a (plenty big enough) CHAR. Does anyone have the faintest idea > what is going on? > > Paul > > [* - according to finderr this is thrown by TRIM if the resulting string is > >255 chars, hence my previous message. But I'm not using TRIM any more...]