I'm trying to run a SQL statement that creates a few TEMP tables and then applies some joins to those tables.
The query runs just fine in the IDE but when running it in Qlik Sense script, the reload fails. the reason is that the query contains multiple semicolons (;), indicating the end of the SQL, or at least that's what Qlik thinks and ignoring the rest of the SQL, causing a syntax error at the reload time.
here's a simplified version of the SQl I'm trying to run in qlik:
CREATE TEMP TABLE Eng as (
select distinct FIELD_A from SCHEMA.fact_table
); // first semicolon
CREATE TEMP TABLE phone_calls as (
SELECT das.* FROM SCHEMA.fact_table_TWO das ); // second semicolon
select * from Eng left join phone_calls on phone_calls.key_field_1 = Eng.key_field_2 ; // last semicolon