Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, I'm trying to prepare data from a warehouse.
I want to download data for 2022/2023 and I use a temporary table for this and then delete it.
Unfortunately, there is no data in the new table, I don't know what I'm doing wrong, because the code seems correct, please help.
Table "sales" is empty. I try load first 10000 and I have some data in "sales_tmp"
LIB CONNECT TO 'HD';
First 10000
sales_tmp:
LOAD
hid_sklep,
date(hid_data) as data,
Year(hid_data) as year,
Month(hid_data) as month,
kod_ean,
hid_segment;
SELECT
"hid_sklep",
"hid_data",
"kod_ean",
"hid_segment"
FROM "public"."sales_72"
;
sales:
LOAD *
Resident sales_tmp
;
Drop table sales_tmp;
Hi, if you load a table with the same fields as the previous laoded tabla, qlik will do an autocontenation, setting the new rows of the first table, you can avoid this using 'NoConcatenate' before the load:
sales:
NoConcatenate LOAD *
Resident sales_tmp
Tables with the same data-structure are automatically concatenated. Means in your case no tables sales is created else this load is added to the sales_tmp which is afterwards deleted and therefore no data exists. This could be avoided with the load-prefix of noconcatenate. But in your case the extra resident-load is superfluous and you could save resources if you skip this part.
Hi, the NoConcatenate prefix forces two loaded tables with the same set of fields to be treated as two separate internal tables, otherwise they will be automatically concatenated.
LIB CONNECT TO 'HD';
First 10000
sales_tmp:
LOAD
hid_sklep,
date(hid_data) as data,
Year(hid_data) as year,
Month(hid_data) as month,
kod_ean,
hid_segment;
SELECT
"hid_sklep",
"hid_data",
"kod_ean",
"hid_segment"
FROM "public"."sales_72"
;
NoConcatenate
sales:
LOAD *
Resident sales_tmp
;
Drop table sales_tmp;
Hi, if you load a table with the same fields as the previous laoded tabla, qlik will do an autocontenation, setting the new rows of the first table, you can avoid this using 'NoConcatenate' before the load:
sales:
NoConcatenate LOAD *
Resident sales_tmp
Tables with the same data-structure are automatically concatenated. Means in your case no tables sales is created else this load is added to the sales_tmp which is afterwards deleted and therefore no data exists. This could be avoided with the load-prefix of noconcatenate. But in your case the extra resident-load is superfluous and you could save resources if you skip this part.
Hi, the NoConcatenate prefix forces two loaded tables with the same set of fields to be treated as two separate internal tables, otherwise they will be automatically concatenated.
LIB CONNECT TO 'HD';
First 10000
sales_tmp:
LOAD
hid_sklep,
date(hid_data) as data,
Year(hid_data) as year,
Month(hid_data) as month,
kod_ean,
hid_segment;
SELECT
"hid_sklep",
"hid_data",
"kod_ean",
"hid_segment"
FROM "public"."sales_72"
;
NoConcatenate
sales:
LOAD *
Resident sales_tmp
;
Drop table sales_tmp;
Thx, You all for helping me 🙂