Qlik Community

QlikView Documents

QlikView documentation and resources.

Announcements
Document boards are being consolidated, this board no longer allows NEW documents READ MORE

Binary Load to Create QVD's

cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Binary Load to Create QVD's

Attachments

Have you ever had a source file you needed to play with but have not had the QVD's to perform a reload?

No Problem use the script below: -

FOR i=0 TO $(vTableNumber)

LET vTableName =TableName($(i));

TRACE EXPORTING '$(vTableName)';

STORE '$(vTableName)' INTO [$(vTableName).QVD] (QVD);

IF $(i)=0 THEN

  LET vDropString = '[$(vTableName)]';

  ELSE 

  LET vDropString = '[$(vTableName)]'&','&'$(vDropString)';

ENDIF

NEXT

DROP TABLES $(vDropString);

LET vDropString = NULL();

LET i = NULL();

LET vTableName = NULL();

LET vTableNumber = NULL();

//**************************************************************************************

//Updated code to allow for spaces in table names per below comments

//New version is slightly refined with a single loop

//**************************************************************************************

Tags (3)
Comments
msteedle
Partner
Partner

You may want to add square brackets around the QVD reference, in case the table name has spaces. This would prevent an error from occurring.

[$(vTableName).QVD]


There are ways to combine the two loops into one, as well.

0 Likes
Not applicable

New version updated to reduce looping.

0 Likes
Not applicable

nice one

0 Likes
erichshiino
Partner
Partner

You can also include this script on the end of the app and use partial reload.

That's why it's important to mark the prohibit binary load option if you want to protect the data on the qvw

Not applicable

Felim.

Every now and then, someone posts something so simple, but so useful.

This is one of those.

Many thanks

Not applicable

Very true Erich, for all those sneaky espionage types it is a tool of destruction... mwahahaha

alex_millan
Creator III
Creator III

Thanks for sharing

0 Likes
Version history
Last update:
‎2014-04-24 09:11 AM
Updated by: