Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

adding concatenate column in Month wise QVD files

Dear Expert,

i have month wise separate Trade QVD files for Example  for JAN-2014 i have <QVD file Name>-JAN2014.qvd  for FEB-2014 i have <QVD file Name>-FEB2014.qvd and so on.

i have to add some additional Columns into all qvd files. if it was only one qvd file it was easy.

i want to read all qvd files from a folder and add columns into it and store into the same location.

how can i do that please help

Thanks

JKV

5 Replies
Kushal_Chawda

what additional column you want to add?

Not applicable
Author

Hi,

i wanted to create some key field by adding two columns. i have done by using for loop. i read each file one by one in for loop and add additional columns and save with same name

Thanks

JKV

Kushal_Chawda

So to create the Key field , are you using the two fields from the same QVDs ?

Not applicable
Author

yes,

i can do the same at load time also. but it was taking a time to load into main qvw application. so i done on all qvd files and keep into the qvd only. so load time can save.

tresesco
MVP
MVP

Try like:

FOR Each File in filelist ('yourpath'&'\*.qvd')

    LOAD
          *,
          'AA' as NewField
From $(File)(QVD);

Let vTable=SubField(SubField('$(File)','\',-1),'.',1);


Store $(vTable) Into $(vTable)&'.qvd (qvd)';

NEXT File