[Gambas-user] Meanwhile, back at "IN ()" constraints
bb
adamnt42 at gmail.com
Thu May 12 12:23:02 CEST 2022
(Sorry I have lost the original thread.)
After a couple of hours looking through our local gb.db (&etc) code I
cannot understand why this is not working elsewhere.
Both db.exec("SELECT * FROM xyzzy WHERE ahab in (&1)",
["abc",def","etc"]) and the local expansion using array.Join work
perfectly.
In both cases the query generated by gb.db according to the db.debug
output is correct, i.e.
SELECT * FROM xyzzy WHERE ahab IN ('abc', 'def', 'etc');
I really can't understand this not working for other people. The only
thing I can possibly think of is a local change that was done before
git ever happened??? But even after using that awful kdiff utility on
the entire Gambas source code I cannot find any clue.
But finally, for years we have used my other suggestion, i.e. let the
database sort out the query by using subqueries for the IN clause.
A mystery!
b
More information about the User
mailing list