Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
i have 2 tables to load via mysql , both tables have the same fields , i need after the load of the sql to have 2 tables in the qlikview so i can use each table , when i am running this i am getting all in "table1" and not table 1 and table 2 , any idea why ?
table1:
SELECT *
FROM prod.queries
where year(query_time) > '2018';
table2:
SELECT *
FROM pmx.queries
where year(query_time) > '2018';
Because the two tables have exactly the same fields. If that's the case then Qlikview automatically concatenates the tables.
If you don't want that then you can use the NoConcatenate keyword in front of the Select keyword.
Personally, I think that sounds like bad idea in this case. I'd add a Source field to register where the data came from, but I'd keep all the records in one table.
table1: SELECT *, 'prod' as Source FROM prod.queries where year(query_time) > '2018'; CONCATENATE (table1) SELECT *, 'pmx' as Source FROM pmx.queries where year(query_time) > '2018';
The field Source can then be used if you need to select data from a specific source.