Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
QVD's are not being generated for few tables with the below script.
Ex: I have following tables
Table_2014,
Table_2014_1,
Table_2015_2,
Table_2015_6 ..of these.. only few tables are getting stored to qvd's sometimes the 1st and 3rd gets loaded, and sometimes 2nd and 3rd table, but not all the tables.
this is wat i have written....
FOR i=0 to NoOfTables()-1
LET vTabName=TableName(0);
STORE [$(vTabName)] into \\QVDpath\$(vTabName).qvd (qvd);
DROP Table [$(vTabName)];
NEXT i
Is there any problem with tables naming convention...
John
Do you have the same tables on every reload? And you get different number of tables stored with the same script?
Do you apply some conditional control script logic that may lead to removing / autoconcatenating tables on one reload but not on the other?
Have you tried adding some TRACE statements to track the number and names of all tables?
i do not know which table "Tablename(0)" is referencing as you drop this table after
what does next tablename(0) is getting?
as I understood Tablename(x) and NoOfTables() references to the previous loaded tables
so i would try: LET vTabName=TableName(i);
I tried Wat u mentioned Rudolf, I am getting error at the store statement.
Do you have the same tables on every reload? And you get different number of tables stored with the same script?
Do you apply some conditional control script logic that may lead to removing / autoconcatenating tables on one reload but not on the other?
Have you tried adding some TRACE statements to track the number and names of all tables?
Hi.
I had some issues in the past with regards to Set and Let in a for loop.
Try using Set vTableName =....
alternatively you are going to have to pre-create a list of table names and then do a peek in your for loop. not as fast but you might need to do it in an alternate method.
Gareth
Swuehl, most of the tables are similar only slight change in suffix of the table name. I'm using the same script it is giving different results and finally no I have not used Trace statement. And also there are no conditional control logic or anything ...like that.
Thanks Swuehl, I figured out the problem, there are 3 tables with same field names where all were auto concatenating.
Cud you please tell how to undo this autoconcatenation
Hi, johnlewis.
Verify the following:
FOR i = 1 to NoofTables()
LET vTabName = TableName($(i)-1); //It is work only thus.
STORE [$(vTabName)] into [$(QVDpath)\$(vTabName).qvd] (qvd);
DROP TABLE vTabName;
FOR i;
Hope this helps!
Use Noconcatenate function:
For example:
If the field names and number is same in 2 or more tables them QlikView performs an automatic concatenation but it is possible to prevent this automatic concatenation by using NoConcatenate
Let us load the same tables as in Part1 i.e. Table Cust_1 and Cust_2. These tables have same set of fields so they should get concatenated but this time load them by using NoConcatenate
No Jonas, Its not working its throwing error