Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a QlikView Doc that is responsible for creating several QVDs. I set it up to load Tables and Store them into QVDs but I leave the Drop Table statements until the very last Tab (no reason; just by habit).
Occasionally, when loading a Table with a name very similar to the previous table, I get an error when the Store is attempted. It appears the script loads the second table into the first even though the second has a new table label. When the second Store is attempted, there is no table with the name specified.
I get around it by dropping the first table after the first Store statement but I am very curious why it happens.
Here's the code:
Calendar_Weeks:
LOAD YearWeek, Year, Week, Mth, Qtr, Season;
SQL SELECT * FROM Calendar_Weeks;
STORE Calendar_Weeks INTO C:\Calendar_Weeks.QVD;
Calendar_Weeks_All_Years:
LOAD YearWeek, Year, Week, Mth, Qtr, Season;
SQL SELECT * FROM Calendar_Weeks_All_Years;
STORE Calendar_Weeks_All_Years INTO C:\Calendar_Weeks_All_Years.QVD;
Any ideas why? Again I can get around it but I'm very curious why it happens.
Thanks in advance,
Mark Donovan
Its not because of similar table name . If you change the table names still the results will be same .
This happens because both the table have same column so qlikview concatenates them and store it in the first table .
use this for no concatenation
Calendar_Weeks:
LOAD YearWeek, Year, Week, Mth, Qtr, Season;
SQL SELECT * FROM Calendar_Weeks;
STORE Calendar_Weeks INTO C:\Calendar_Weeks.QVD;
noconcatenate
Calendar_Weeks_All_Years:
LOAD YearWeek, Year, Week, Mth, Qtr, Season;
SQL SELECT * FROM Calendar_Weeks_All_Years;
STORE Calendar_Weeks_All_Years INTO C:\Calendar_Weeks_All_Years.QVD;
Its not because of similar table name . If you change the table names still the results will be same .
This happens because both the table have same column so qlikview concatenates them and store it in the first table .
use this for no concatenation
Calendar_Weeks:
LOAD YearWeek, Year, Week, Mth, Qtr, Season;
SQL SELECT * FROM Calendar_Weeks;
STORE Calendar_Weeks INTO C:\Calendar_Weeks.QVD;
noconcatenate
Calendar_Weeks_All_Years:
LOAD YearWeek, Year, Week, Mth, Qtr, Season;
SQL SELECT * FROM Calendar_Weeks_All_Years;
STORE Calendar_Weeks_All_Years INTO C:\Calendar_Weeks_All_Years.QVD;
That makes sense. Thank you!