Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Concatenate all the qvd files

Can anyone tell me how can i concatenate all the same qvd files into one qvd files?

1 Solution

Accepted Solutions
Not applicable
Author

If all of your files are located in the same directory you could also use for-each:


for each vFILE in filelist ('directory\to\qvds\*.qvd');
MyTable:
LOAD aa,bb,cc
from $(vFILE) (qvd);

next vFILE;


Kind regards,
Jonas Manderscheid

View solution in original post

8 Replies
Not applicable
Author

If all qvds are in the same model, you have to load all qvds into one table then store your table into a qvd

example:

MyTable:

LOAD aa,bb,cc from 1.qvd (qvd);

MyTable:

LOAD aa,bb,cc from 2.qvd (qvd);

....

Store MyTable into AllQvd.qvd;

Rgds,

Not applicable
Author

Just another question, do i have to name the 'MyTable' on top of the LOAD same for every single qvd files?

Not applicable
Author

If all of your files are located in the same directory you could also use for-each:


for each vFILE in filelist ('directory\to\qvds\*.qvd');
MyTable:
LOAD aa,bb,cc
from $(vFILE) (qvd);

next vFILE;


Kind regards,
Jonas Manderscheid

Not applicable
Author

Hi

Use the label only once. QV will automatically concatenate tables with the same set of fields. Fieldnaming can also be impacted by using QUALIFY/UNQUALIFY which can add/remove the label to fhe fields to make them distinct. Default is UNQUALIFY * meaning no label attached to the field names.

For partially matching field sets you can also force CONCATENATION by adding it before the load statement. You can also create more complicated record combinations using JOIN.

Regards

Jürg

Not applicable
Author

Thanks Jonas, it works perfectly!

Not applicable
Author

but, If all qvds not are in the same model? is possible?

Not applicable
Author

@Sherer: Yes it is possible by renaming fields of your different qvds, and / or using Concatenate function

Not applicable
Author

a qvd stores data for a single table, if you have different models they can't be stored in the same qvd file