Hi,
I have a SQLite problem with a simple query ...
When I run this query from windows, I get correct results.
When I run it from B4J, I get wrong results.
I just upgrade to B4J version 9.80, the jSQL.jar date is 2022-07-05 (version 1.61 in B4J IDE)
Should I upgrade to a more recent jSQL.jar, and how to to it ? Simply copy a fresher jar file to internal library folder ?
thanks for help
the query
As expected, on windows I get
but under B4J, i get
Note 2nd column is correct ... ?
I have a SQLite problem with a simple query ...
When I run this query from windows, I get correct results.
When I run it from B4J, I get wrong results.
I just upgrade to B4J version 9.80, the jSQL.jar date is 2022-07-05 (version 1.61 in B4J IDE)
Should I upgrade to a more recent jSQL.jar, and how to to it ? Simply copy a fresher jar file to internal library folder ?
thanks for help
Table (extract):
id ticket heure article qte prix
1 1 2021-07-20 10:14:44 Coca 1 2
2 3 2021-07-20 10:15:10 Coca 1 2
2 3 2021-07-20 10:15:10 Heineken 1 3,2
2 4 2021-07-20 10:15:21 Coca 1 2
2 4 2021-07-20 10:15:21 Heineken 1 3,2
2 5 2021-07-20 10:16:07 Coca 1 2
2 5 2021-07-20 10:16:07 Heineken 1 3,2
2 5 2021-07-20 10:16:07 Jambon-beure 1 2,2
2 6 2021-07-20 11:17:52 Quatre-quarts 1 1,5
2 7 2021-07-23 11:23:56 Pâté 1 2,3
2 8 2021-07-23 14:41:51 Heineken 1 3,2
the query
B4X:
select
theticket,
max(montant) as montantmax,
nombre,
heure
from
(
Select
ticket as theticket,
Sum(qte) As nombre,
Sum(qte * prix) As montant,
heure
From
tickets
group by ticket
)
where
heure >= '2021-01-01' and heure < '2021-07-22'
As expected, on windows I get
B4X:
ticket montantmax nombre heure
5 7.4 3 2021-07-20
B4X:
ticket montantmax nombre heure
6 7.4 1 2021-07-20