HXTT Paradox
Error using BETWEEN
Juan D��az
2011-01-03 09:26:20.0
While the following SQL statement works fine:

SELECT SUM(field) FROM table WHERE field2>='2010-10-01' AND field2<='2010-10-31';

this one produces an error:

SELECT SUM(field) FROM table WHERE field2 BETWEEN '2010-10-01' AND '2010-10-31';

with the following message:

SQLState 60000
ErrorCode 393216

and the exception being:

Error: java.lang.ArrayIndexOutOfBoundsException: 1
at com.hxtt.sql.paradox.f.a(Unknown Source)
at com.hxtt.sql.paradox.m.a(Unknown Source)
at com.hxtt.sql.q.a(Unknown Source)
at com.hxtt.sql.cm.a(Unknown Source)
at com.hxtt.sql.ay.a(Unknown Source)
at com.hxtt.sql.dk.a(Unknown Source)
at com.hxtt.sql.dk.a(Unknown Source)
at com.hxtt.sql.c2.f(Unknown Source)
at com.hxtt.sql.dk.a(Unknown Source)
at com.hxtt.sql.br.a(Unknown Source)
at com.hxtt.sql.ai.a(Unknown Source)
at com.hxtt.sql.ai.a(Unknown Source)
at com.hxtt.sql.ai.execute(Unknown Source)

Thanks.
Re:Error using BETWEEN
HXTT Support
2011-01-03 09:38:48.0
Try run once "reindex all on yourTable;" sql to see whether your issue disappear.
Re:Error using BETWEEN
Juan D��az
2011-01-03 12:06:38.0
I issued a "reindex all on table" command and the problem persists.

Juan

PS Sorry for duplicating the issue, it came from refreshing my browser trying to check for any reply.
Re:Re:Re:Error using BETWEEN
HXTT Support
2011-01-03 16:44:27.0
Then download the latest package to see whether your issue disappear. We tested the following sql and hasn't found issue:
create table table1 (field int, field2 date, primary key (field2));
insert into table1 (field,field2) values(111,'2010-03-11');
insert into table1 (field,field2) values(11,'2010-10-11');
insert into table1 (field,field2) values(111,'2010-10-31');
insert into table1 (field,field2) values(222,date());
SELECT SUM(field) FROM table1 WHERE field2 BETWEEN '2010-10-01' AND '2010-10-31';

If you meet issue with the latest package, please email us your .db and .px sample.





Google