Re: lmatter[1,6] = '011191' does not work, but lmatter[1,6] like
Posted in 1998
To further muddy the waters, I tried this. Our upgrade-overdue (but scheduled) system is Online 5.07.UC1X2, DEC Alpha 2100, Digital Unix 3.2G. All selects return 011191 as they should. Randy Cross On 1 Oct 98 at 10:26, Jonathan Leffler wrote: > Date: Thu, 1 Oct 1998 10:26:58 -0700 (PDT) > From: Jonathan Leffler <jleffler@informix.com> > To: rfurdzik@paulweiss.com > Cc: informix-list@iiug.org > Subject: Re: lmatter[1,6] = '011191' does not work, but lmatter[1,6] like '011191%' works perfectly > On Thu, 1 Oct 1998 rfurdzik@paulweiss.com wrote: > > My select is from a view which is using GROUP BY clause! It works fine > > when selecting directly from a table or from a view without GROUP BY. > > Try this: > > > > SQL[1]: create table t (lmatter char(10)); > > SQL[2]: insert into t values ('011191xxxx'); > > SQL[3]: select lmatter[1,6] from t where lmatter[1,6] = '011191'; -- WORKS FINE! > > 011191 > > SQL[4]: create view test as select lmatter from t; > > SQL[5]: select lmatter[1,6] from test where lmatter[1,6] = '011191'; -- WORKS FINE! > > 011191 > > SQL[3]: drop view test > > SQL[4]: create view test as select lmatter from t GROUP BY lmatter; -- HERE IS A PROBLEM! > > SQL[5]: select lmatter[1,6] from test where lmatter[1,6] = '011191'; -- It returns no data! > > > > Nothing returned !!! Any idea ??? > > This is a rather different problem -- it seems to be a bug in grouped view > handling. With the grouped view, I too get a problem on both 7.24.UC1 and > 7.30.UC1 on a Sun Sparc 20 running Solaris 2.6. Given that you've > got the problem on HP and I've got it on Solaris (and on an HP Vectra > 486/66 running RedHat 5.1 Linux with SE 7.24.UC5), it is a generic bug, at > least in the 7.2x and later releases. > > You should definitely report this as a bug. Go to Informix Tech Support > with this test case and this email. Get a bug entered if there isn't one > already for it. If you get it entered, it gets a much higher priority than > if I get it entered. > > > From: Jonathan Leffler <jleffler@informix.com> > > Date: 09/30/98 06:00:08 PM > > To: Rafal Furdzik/PaulWeiss > > > > On Wed, 30 Sep 1998 rfurdzik@paulweiss.com wrote: > > >[Subject] lmatter[1,6] = '011191' does not work, but lmatter[1,6] like > > '011191%' works perfectly > > > Any idea ???? If I do query "Select lmatter[1,6] ..." it returns string > > > '011191', but Where statement for those criteria does not. Why I can not use > > > "=" ???? > > > > Which version of which database on which platform? > > Please, when asking questions like this, be specific. > > > > What you are seeing smacks of a bug, but we need to know > > platform, product and version details before anything > > can be deduced. > > > > For instance, on my Sun Sparc 20 running Solaris 2.6, > > using OnLine 7.24.UC1, I can run the script: > > > > SQL[1]: create temp table t (lmatter char(10)); > > SQL[2]: insert into t values ('011191xxxx'); > > SQL[3]: select lmatter[1,6] from t where lmatter[1,6] = '011191'; > > 011191 > > SQL[4]: > > > > This looks like the correct result to me. It isn't a generic > > problem on all platforms and versions, so we need the details > > from you before we can do anything useful. > > Yours, > Jonathan Leffler (jleffler@informix.com) #include <witticism.h> > Guardian of DBD::Informix v0.60 -- http://www.perl.com/CPAN > Informix IDN for D4GL & Linux -- http://www.informix.com/idn > >