Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

siva_boggarapu
Contributor II

How to save multiple qvds into one qvd?

Hi there,

I have 10 qvd files. I need to make them as single qvd file. Could you please any one describe this?

24 Replies
Not applicable

How to save multiple qvds into one qvd?

Hi,

you can do something like:

ALL_QVD:

load null() as dummy autogenerate(0);

// this is needed for making the concat afterwards

for each qvd_file in filelist ('c:\your_qvd_dir\*.qvd')

     concatenate (ALL_QVD)

     load *

     from $(qvd_file) (qvd);

next qvd_file

drop field dummy;

store ALL_QVD into ALL_QVD.QVD;

Take a look on syntax because I don't have test it.

Hope that help!

Andrea

danielrozental
Honored Contributor II

How to save multiple qvds into one qvd?

Why do you need to build them into one? what's the problem on keeping them separated?

Not applicable

How to save multiple qvds into one qvd?

You Could simply say,

Test_QVD:

Load *

From ;

Store Test_QVD into [TEST\Final.QVD];

This should work.

-Sridhar

danielrozental
Honored Contributor II

How to save multiple qvds into one qvd?

Sridhar, that will only work if all qvd files have the same fields, if not you will end up having Test_QVD_1, Test_QVD_2, etc.

Andrea's answer is more generical in that regard.

Not applicable

How to save multiple qvds into one qvd?

Exactly, my solution will work when the field names are same in all QVD`s.


When siva.boggarapu said about concatenating all the QVD`s in to one QVD, I have assumed that he may have the same field names in all QVD`s.

Moreover if the Qvd`s has different field names, then my code will create a QVD only for the 1st loaded table and it will not create a QVD for subsequent loaded tables.

Apologies for my misunderstandings and i accept Andrea`s answer is more generical in that regard.

- Sridhar

Not applicable

How to save multiple qvds into one qvd?

I use this solution more generally for TXT or XLS files. I just  propose it because  is , as you said, more generic.

In fact the Sridhar method is quite more efficent if the case of same fields.

Andrea

siva_boggarapu
Contributor II

How to save multiple qvds into one qvd?

Hello Danielato,

Could you please understand my requirement. I need to make them as single qvd file. Is it possible?

Load *from [..\Data Loader\Loader OverUnder\QVD\OverUnderFDUS2011.qvd](qvd);

Load *from [..\Data Loader\Loader OverUnder\QVD\OverUnderSTAFF2011.qvd](qvd);

Load *from [..\Data Loader\Loader OverUnder\QVD\OverUnderILS2011.qvd](qvd);

Load *from [..\Data Loader\Loader OverUnder\QVD\OverUnderETCA2011.qvd](qvd);

Load *from [..\Data Loader\Loader OverUnder\QVD\OverUnderFDCA2011.qvd](qvd);

Load *from [..\Data Loader\Loader OverUnder\QVD\OverUnderSTCA2011.qvd](qvd);

Load *from [..\Data Loader\Loader OverUnder\QVD\OverUnderGACA2011.qvd](qvd);

Re: How to save multiple qvds into one qvd?

Siva,

Shridar already answered you here. Your code, would look like

// This loads all files in one table

TempLoad:

LOAD *

FROM [..\Data Loader\Loader OverUnder\QVD\OverUnder*.qvd] (qvd);

// This stores all previous QVDs in one

STORE TempLoad INTO [..\Data Loader\Loader OverUnder\QVD\CompleteFile.qvd];

Credits to Shridar.

Hope that helps.

Miguel Angel Baeyens

BI Consultant

Comex Grupo Ibérica

Not applicable

How to save multiple qvds into one qvd?

Hi,

if in the directory you have only the qvd that you mention you can do:

ALL_QVD:

load null() as dummy autogenerate(0);

// this is needed for making the concat afterwards

for each qvd_file in filelist ('..\Data Loader\Loader OverUnder\QVD\*.qvd')

     concatenate (ALL_QVD)

     load *

     from $(qvd_file) (qvd);

next qvd_file

drop field dummy;

store ALL_QVD into ALL_QVD.QVD;