Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

rescue old data from qvd

Hi,

I got an old qvw which displays data, that I cant reload from source, because source data has gone.

Is there a chance to store or extracts old data from the qvw?

Thanks in advance

Klaus

Tags (2)
1 Solution

Accepted Solutions

Re: rescue old data from qvd

You can use the binary statement to load data from a qvw file into another qvw file. You can then store the data into qvd's if you want (or in csv). The binary statements has to be the absolute first line in your script. You can use something like below to load the data from a qvw file and create qvd's for every table. Change your.qvw and c:\temp\extract to what's appropriate for you.

BINARY your.qvw;

Directory c:\temp\extract;

FOR i = 0 to NoOfTables()-1

          LET vTableName = TableName($(i));

          LET vOutfile = '$(vTableName).qvd';

          STORE [$(vTableName)] INTO [$(vOutfile)] (qvd);

NEXT i


talk is cheap, supply exceeds demand
2 Replies

Re: rescue old data from qvd

You can use the binary statement to load data from a qvw file into another qvw file. You can then store the data into qvd's if you want (or in csv). The binary statements has to be the absolute first line in your script. You can use something like below to load the data from a qvw file and create qvd's for every table. Change your.qvw and c:\temp\extract to what's appropriate for you.

BINARY your.qvw;

Directory c:\temp\extract;

FOR i = 0 to NoOfTables()-1

          LET vTableName = TableName($(i));

          LET vOutfile = '$(vTableName).qvd';

          STORE [$(vTableName)] INTO [$(vOutfile)] (qvd);

NEXT i


talk is cheap, supply exceeds demand
Not applicable

Re: rescue old data from qvd

Thank you Gysbert,

that worked wonderful.

Have a nice weekend

Klaus

Community Browser