db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <de...@segel.com>
Subject RE: Record not found in some SQL - Bug?
Date Wed, 28 Jan 2009 12:56:15 GMT
Is this reproducible on all tries?

The point of the question is to understand why you have only one row that is
not working.

What happens if you reload the data and run the test again?
Do you get the same results?

Are you loading from a file? Is there a corrupt character?

The length() function. Is that the length of the string in bytes or the
number of characters? (Hint: Think Unicode)

Before calling this a bug, lets think about where you can have issues and
then work through those issues before saying it's a bug.

Just some thoughts...

-Mike


> -----Original Message-----
> From: jrgchip [mailto:chip@datamology.com]
> Sent: Tuesday, January 27, 2009 11:10 PM
> To: derby-user@db.apache.org
> Subject: Record not found in some SQL - Bug?
> 
> 
> I have a "Product" table with a "Num" column that contains a record that
> is
> only accessible by some SQL and not others.  I have tested this by JDBC
> access from my Java app as well was from IJ directly.
> 
> ij> select "Num", length("Num") as "Len" from app."Product" where "Num"
> like
> 'HG1549%';
> Num            |Len
> ----------------------------
> HG15490        |7
> HG15493        |7
> HG15497        |7   <== Found as expected
> HG15499        |7
> 4 rows selected
> 
> ij> select "Num" from app."Product" where "Num" = 'HG15490';
> Num
> ----------------
> HG15490  <== Found as expected
> 1 row selected
> 
> ij> select "Num" from app."Product" where "Num" = 'HG15493';
> Num
> ----------------
> HG15493  <== Found as expected
> 1 row selected
> 
> ij> select "Num" from app."Product" where "Num" = 'HG15499';
> Num
> ----------------
> HG15499  <== Found as expected
> 1 row selected
> 
> ij> select "Num" from app."Product" where "Num" = 'HG15497';
> Num
> ----------------
> 0 rows selected  <== Not found!!!
> 
> What could possibly hide the 'HG15497' record from the last SELECT?
> 
> And it's not just a matter of equality versus inequality...as the
> following
> SQL does return the record:
>     SELECT I."STYLE" FROM TEMP."ZJVINV2" AS I INNER JOIN APP."Product" AS
> P
> ON I."STYLE" = P."Num" WHERE I."STYLE" = 'HG15497';
> 
> I am using Java DB v10.3.2.1.
> 
> --
> View this message in context: http://www.nabble.com/Record-not-found-in-
> some-SQL---Bug--tp21700110p21700110.html
> Sent from the Apache Derby Users mailing list archive at Nabble.com.




Mime
View raw message