Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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;
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.
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.
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.