Bug? SQLite select on a view sometimes returns 0 records

Alessandro71

Well-Known Member
Licensed User
Longtime User
Probably not a B4i bug, but a SQLite iOS driver issue
A simple select statement like

SELECT field FROM view WHERE field>0

sometimes (not always, and not with an identified pattern) return 0 results
The same code, with the same dataset, running on B4A or B4J, always returns correct results
I tracked down the issue to the FROM table actually being a view
As soon as I substituted the view definition after the FROM statement, the query always returned correct results, as in B4A

SELECT field FROM (SELECT statement from view definition) WHERE field>0
 
Top