AlaSQL / alasql

AlaSQL.js - JavaScript SQL database for browser and Node.js. Handles both traditional relational tables and nested JSON data (NoSQL). Export, store, and import data from localStorage, IndexedDB, or Excel.
http://alasql.org
MIT License
7.04k stars 659 forks source link

UNION ALL does not work with sub query #1146

Open an0sv opened 4 years ago

an0sv commented 4 years ago

I have issues with UNION ALL. I have condensed an example

let d = [{d:1}];

// This works
alasql("create table test");
alasql("select * into test from ?", [d]);
alasql("select d from test where d in (select 1) union all select d from test where d not in (2)");

// This does not work
alasql("create table test");
alasql("select * into test from ?", [d]);
alasql("select d from test where d in (select 1) union all select d from test where d not in (select 2)");
an0sv commented 4 years ago

Anyone having a clue on why this does not work?