Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
Leonid Belov reported IDS 9.40 FC3 on Solaris giving wrong string concatenation when a procedure result is concatenated inside parentheses, returning 'string-*' instead of '*string-'. June C. Hunt reproduced it on 9.40.FC2 on AIX but not on 9.20, and Jay Aymond saw it on 9.30.UC7. rkusenet reported a similar wrong result on 9.21. No fix was given.
Auto-generated by Claude from the posts below — may be imperfect; read the full thread.
Leonid Belov — — source: Usenet: comp.databases.informix
Hello,
there is a problem with string concatenation in Informix 9.40FC3 (SRARC Solaris 9)
1. SELECT '*' || 'string' || '-' FROM systables where tabid = 100;
Result: '*string-'
2. SELECT '*' || ('string' || '-') FROM systables where tabid = 100;
Result: '*string-'
3. CREATE PROCEDURE nvalue()
RETURNING VARCHAR(20);
RETURN 'string';
END PROCEDURE;
SELECT '*' || nvalue() || '-' FROM systables where tabid = 100;
Result: '*string-'
4. SELECT '*' || (nvalue() || '-') FROM systables where tabid = 100;
Result: 'string-*'
Is it a bug?
-----------------
Leonid Belov
white@ntik.ru
↪ replying to Leonid Belov
June C. Hunt — — source: Usenet: comp.databases.informix
Leonid Belov wrote:
> there is a problem with string concatenation in Informix 9.40FC3 (SRARC
Solaris 9)
>
> 1. SELECT '*' || 'string' || '-' FROM systables where tabid = 100;
> Result: '*string-'
>
> 2. SELECT '*' || ('string' || '-') FROM systables where tabid = 100;
> Result: '*string-'
>
> 3. CREATE PROCEDURE nvalue()
> RETURNING VARCHAR(20);
> RETURN 'string';
> END PROCEDURE;
>
> SELECT '*' || nvalue() || '-' FROM systables where tabid = 100;
> Result: '*string-'
>
> 4. SELECT '*' || (nvalue() || '-') FROM systables where tabid = 100;
> Result: 'string-*'
>
> Is it a bug?
For what it is worth, I get the same results that you are reporting using
9.40.FC2 on AIX 5.2.0.0, but get the results that you would expect using
9.20.UC3 on AIX 4.3.3.0.... Have you talked to the folks at Tech Support?
--
June Hunt
↪ replying to June C. Hunt
Jay Aymond — — source: Usenet: comp.databases.informix
I also get the incorrect results on IDS 9.3.0.UC7 using Solaris.
"June C. Hunt" <june_c_hunt@hotmail.com> wrote in message
news:c7an6d$1m0h8$1@ID-209514.news.uni-berlin.de...
> Leonid Belov wrote:
> > there is a problem with string concatenation in Informix 9.40FC3 (SRARC
> Solaris 9)
> >
> > 1. SELECT '*' || 'string' || '-' FROM systables where tabid = 100;
> > Result: '*string-'
> >
> > 2. SELECT '*' || ('string' || '-') FROM systables where tabid = 100;
> > Result: '*string-'
> >
> > 3. CREATE PROCEDURE nvalue()
> > RETURNING VARCHAR(20);
> > RETURN 'string';
> > END PROCEDURE;
> >
> > SELECT '*' || nvalue() || '-' FROM systables where tabid = 100;
> > Result: '*string-'
> >
> > 4. SELECT '*' || (nvalue() || '-') FROM systables where tabid = 100;
> > Result: 'string-*'
> >
> > Is it a bug?
>
> For what it is worth, I get the same results that you are reporting using
> 9.40.FC2 on AIX 5.2.0.0, but get the results that you would expect using
> 9.20.UC3 on AIX 4.3.3.0.... Have you talked to the folks at Tech Support?
>
> --
> June Hunt
>
>
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.