Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
bobbydave
Creator III
Creator III

Creating an empty table that will eventually populate.

I have a table below. This loops around and picks up a number of countries and stores them

I have one country that will have a blank table for now but over the next coming weeks, it will populate. I want to put in a catch so that right now,

if the table for LU is blank, store the LU table as blank so that the QVD is still created. Because it is empty at the moment, the table hasn't created. Is there a way to do this?

E_Tia_CLAIM_QUESTION_WIZ:
LOAD
"COUNTRY_CODE",
"CLAIM_NO",
"Q81";
SQL SELECT '$(country_code)' COUNTRY_CODE , CQW.*
FROM
"MI_$(country_code)_DBA"."CLAIMS_Q_WIZARD" CQW;


STORE E_Tia_CLAIM_QUESTION_WIZ into $(vQVDs)\E_Tia_CLAIM_QUESTION_WIZ_$(country_code).QVD;
DROP Table E_Tia_CLAIM_QUESTION_WIZ;

1 Solution

Accepted Solutions
avkeep01
Partner - Specialist
Partner - Specialist

Ha David Whelton,

Just create an empty inline table:

E_Tia_CLAIM_QUESTION_WIZ:

LOAD * INLINE [

COUNTRY_CODE, CLAIM_NO, Q81

];

CONCATENATE (E_Tia_CLAIM_QUESTION_WIZ)
LOAD
"COUNTRY_CODE",
"CLAIM_NO",
"Q81";
SQL SELECT '$(country_code)' COUNTRY_CODE , CQW.*
FROM
"MI_$(country_code)_DBA"."CLAIMS_Q_WIZARD" CQW;

In this case you will always have the table, but when there is no date the table will be empty.

View solution in original post

2 Replies
avkeep01
Partner - Specialist
Partner - Specialist

Ha David Whelton,

Just create an empty inline table:

E_Tia_CLAIM_QUESTION_WIZ:

LOAD * INLINE [

COUNTRY_CODE, CLAIM_NO, Q81

];

CONCATENATE (E_Tia_CLAIM_QUESTION_WIZ)
LOAD
"COUNTRY_CODE",
"CLAIM_NO",
"Q81";
SQL SELECT '$(country_code)' COUNTRY_CODE , CQW.*
FROM
"MI_$(country_code)_DBA"."CLAIMS_Q_WIZARD" CQW;

In this case you will always have the table, but when there is no date the table will be empty.

Miguel_Angel_Baeyens

Indeed, I frequently use

LOAD * INLINE [

Field1

];

Where "Field1" is at least one of the fields coming from the source, and then concatenating. It's also easier to CONCATENATE when working with loads in loops.