IDS 9.40 FC3 string concatenation
Posted in 2004
Topics: Stored Procedures & SPL, Data Types & Schema Design, Platform-Specific Issues, Versions, Editions & End-of-Life
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
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
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 > >
"Leonid Belov" <white@ntik.ru> wrote > 2. SELECT '*' || ('string' || '-') FROM systables where tabid = 100; > > Result: '*string-' same result in 9.21