
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Load QVD's with different names into 1 table
Dear All,
I need to upload history QVD's. These QVD are stored on adaily base and contain the month/year in the description. I don't see how I can automate this process.
Sample code for 2 months of data:
//load history QVD snapshots
Hist_bedrijf:
load BedrijfLidNummer,
KEY_BedrijfMaand as H_maand
from bedrijfcommunity_200912.qvd(qvd);
load BedrijfLidNummer,
KEY_BedrijfMaand as H_maand
from bedrijfcommunity_200911.qvd(qvd);
.......etc
I would prefer to have a flexible code statement where the QVD name contains a variable.
any suggestions ?
Many thanks,
Erik Pos
- Tags:
- new_to_qlikview
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
i think you can do like this
let ForYear = Year(Today());
let ForMonthNo=NUM(Month(Today()));
let initialname='bedrijfcommunity_';
For Var=1 to $(ForMonthNo)
Load * from initialname& $(ForYear )&(Var)&'.qvd';
next
Hope this will help you........

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
i think you can do like this
let ForYear = Year(Today());
let ForMonthNo=NUM(Month(Today()));
let initialname='bedrijfcommunity_';
For Var=1 to $(ForMonthNo)
Load * from initialname& $(ForYear )&(Var)&'.qvd';
next
Hope this will help you........

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can use the following:
load
NUM#(left(right(filename(),10),6)) as qvd_date,
BedrijfLidNummer,
KEY_BedrijfMaand as H_maand
from bedrijfcommunity_??????.qvd(qvd);
This will load all qvd and generate the month date linked to it.
Rgds,
Sébastien

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Rahul,
This solution works already !
thanks Erik

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sebastien,
This solution is even more flexible and works fine.
Thanks Erik
