You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The EXISTS function works correctly in the main query but throws an error when used in a subquery. For example:
res = alasql('SELECT EXISTS(SELECT "a"), a FROM ?', [[item1, item2]]);
// returns expected value
res = alasql('SELECT * FROM (SELECT EXISTS(SELECT "a"), a FROM ?)', [[item1, item2]]);
// error: Cannot read properties of undefined (reading '0')
Additionally, I've noticed that the function also fails when used with SET:
Unfortunately, this does not fix the problem in any way. Now exists returns a Boolean value (true/false) instead of a number (0.1), but this still doesn't work for subquery(((.
Activity
Support EXISTS Function for Subqueries to fix AlaSQL#1904 (AlaSQL#1939)
mathiasrw commentedon Jul 11, 2024
Released as part of v4.5.0
alsundukov commentedon Jul 31, 2024
Unfortunately, this does not fix the problem in any way. Now exists returns a Boolean value (true/false) instead of a number (0.1), but this still doesn't work for subquery(((.
Why wasn't the test added?
Let EXISTS work subqueries to fix #1904 (#1952)