[
https://issues.apache.org/jira/browse/DERBY-4456?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12784116#action_12784116
]
Knut Anders Hatlen commented on DERBY-4456:
-------------------------------------------
I also see this on 10.3.1.4:
ij> create table t1 (x int primary key);
0 rows inserted/updated/deleted
ij> insert into t1 values 100,101,102,103,107;
5 rows inserted/updated/deleted
ij> select * from t1 where x < 105 and x in (101,103,104);
X
-----------
0 rows selected
But on the latest release (10.5.3.0) it seems to return the expected results:
ij> select * from t1 where x < 105 and x in (101,103,104);
X
-----------
101
103
2 rows selected
I'll see if I can find out what fixed it.
> The result is empty when the query contains in clause and other condition at
> the same time
> ------------------------------------------------------------------------------------------
>
> Key: DERBY-4456
> URL: https://issues.apache.org/jira/browse/DERBY-4456
> Project: Derby
> Issue Type: Bug
> Components: SQL
> Affects Versions: 10.3.1.4
> Reporter: Mingxia Wu
>
> I have a Customers table which contains an0 Integer column named
> CustomerNumber,
> CustomerNumber
> 101 ...
> 102
> 103
> 104
> 105
> 106
> When I execute the following query in my client with jdbc:
> Select * from Customers where CustomerNumber <105 AND CustomerNumber IN
> (101,103,104)
> The result is empty.
> Expected behavior:
> The result return 3 records, 101, 103 and 104
> If I change the query like:
> Select * from Customers where CustomerNumber IN (101,103,104), it works.
> Select * from Customers where CustomerNumber <105, it also works.
> I also test it on another database,like sql server, it works ok.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.