[ 
https://issues.apache.org/jira/browse/DERBY-4001?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12660858#action_12660858
 ] 

Venkateswaran Iyer commented on DERBY-4001:
-------------------------------------------

I forgot to add that the column has to be declared with a "NOT NULL" 
constraint. Attached the output from ij.


======================

C:\apps\derby\db-derby-10.4.2.0-bin\db-derby-10.4.2.0-bin\bin>ij
ij version 10.4
ij> connect .........................................
ij> drop table t2;
0 rows inserted/updated/deleted
ij> create table t2(acdecimal decimal(10,5) not null);
0 rows inserted/updated/deleted
ij> insert into t2 values (-21483.648);
1 row inserted/updated/deleted
ij> insert into t2 values (74387);
1 row inserted/updated/deleted
ij> select * from t2;
ACDECIMAL
------------
-21483.64800
74387.00000

2 rows selected
ij> select acdecimal from t2 where acdecimal < all (select 0.0 from t2);
ACDECIMAL
------------

0 rows selected
ij>

> Sequence comparison with "ALL" does not yield correct results
> -------------------------------------------------------------
>
>                 Key: DERBY-4001
>                 URL: https://issues.apache.org/jira/browse/DERBY-4001
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.3.2.1
>         Environment: Windows
>            Reporter: Venkateswaran Iyer
>            Priority: Minor
>             Fix For: 10.4.2.0
>
>
> A query involving "< ALL" does not yield the right results for decimal 
> datatype. "< ANY" works, though.
> To reproduce the issue:
> % create table t1(col1 decimal(10,5));
> % insert into t1 values (-21483.64800);
> % insert into t1 values (74837.00000);
> % select col1 from t1 where col1 < ALL (select 0.0 from t1);
> The above yields no results whereas it should return the first row.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to