Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi folks i have a 3 qvd files which have same data but they are of differnt dates.
i want to load them into one qvd file..
example: abc.08162012.qvd
abc.08172012.qvd
abc.08202012.qvd
i want to load all the 3 fioles into one qvw while building the front end applications/..
is there a way that it can be done...
Load
FROM
[abc*.qvd]
(qvd);
Hi,
Yes, this is quite an easy one:
Data:
LOAD *
FROM [abc*.qvd] (qvd);
STORE Data INTO FullData.qvd (qvd);
It will loop for each QVD file in the folder that starts by "abc" concatenating to the previous one. After that, this table is stored in only one file containing the three previous files.
Hope that helps.
Miguel
Thanks for the reply but i want to load all these 3 files into one qvd by using some variables...
Hi,
What do you want the variables for? How do you want to use them?
Miguel
Hi,
let vfiledate=08152012
let vcurrentdate= 'ps_current_'&'$(vFileDate) &'.qvd(qvd);
load
date,
field1,field2
.....
FROM
..\SharedDocs\QVDs\$(vcurrentdate);
whatever the solutions that u have given work for all the 3 qvd date files, but if want to load only 2 datefields then??
i have 3 qvds with differnt dates
'ps_current_08152012.qvd
'ps_current_08162012.qvd
'ps_current_08202012.qvd..
the question is when i want to load 15th data i simply replace the vfilename with 08152012 and that works fine
if i want to load 2 dates how to use it....
if i take vfiledate=08152012,08202012... it throws an error...
furher help would be really appreciated..
Thanks
Hi can someone look into this issue???????
Hi,
It all depends on how do you want to do the loop, meaning what logic do you need to load the files that you want. Is it five days? Is it just several files corresponding to several dates specified in a variable?
SET vFiles = 'File20121201.qvd', 'File20121231.qvd'; // set this manually
FOR EACH vFile in '$(vFiles)'
Data:
LOAD *
FROM
(qvd); LOOP
Please elaborate on your requirements.
Hope that helps.
Miguel