Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

QlikView Script Fails when Storing a Second Table with Very Similar Name as the First

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;

Error.jpg

Details.jpg

Any ideas why? Again I can get around it but I'm very curious why it happens.

Thanks in advance,

Mark Donovan

1 Solution

Accepted Solutions
pradosh_thakur
Master II
Master II

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;

Learning never stops.

View solution in original post

2 Replies
pradosh_thakur
Master II
Master II

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;

Learning never stops.
Anonymous
Not applicable
Author

That makes sense. Thank you!