Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi I have a question,
I have a folder contain qvd for each data per month, for illustration is like this:
Data_201501.qvd
Data_201502.qvd
Data_201505.qvd
From the example above, we can see that there is two deleted qvd (Data_201503.qvd , Data_201504.qvd). My goal is to reload and recover the deleted qvd.
I have find the way to get the deleted qvd by compare it with the calendar table and put the missing YearMonth into variable, let's say the varible name is FileLoad. Varible FileLoad has a data like this 201503, 201504
At last I want to load the deleted qvd from the data source and store it into qvd, the problem is how can i load only the 201503 and 201504 value.
I've try using WILDMATCH like this:
Load *
from datasource where wildmatch(YearMonth, $(FileLoad))
But the performance is too bad and really slow. The question is are there another method to load script and compare with variable without using WILDMATCH function ?
Really need your help,
Thanks in advance
Try like this,
Set FileLoad = '201503,201504';
FOR Each File IN $(FileLoad)
MyData:
Load *
From Datasource Where YearMonth = '$(File)';
Store MyData into [Data_$(File).qvd (qvd)];
Next File
Hi Lejours,
Set FileLoad = '201503,201504';
For Each File IN $(FileLoad)
MyData:
Load *
from Data_$(File).qvd(qvd);
NEXT File
Store Data Into
;
Hi,
Thanks for suggestion. FYI, I load the data from the DataSource not from the existing QVD.
Load *
from datasource where wildmatch(YearMonth, $(FileLoad))
i want to get again the deleted data from the datasource. QVD for Data_201503 and Data_201504 already deleted.
Try like this,
Set FileLoad = '201503,201504';
FOR Each File IN $(FileLoad)
MyData:
Load *
From Datasource Where YearMonth = '$(File)';
Store MyData into [Data_$(File).qvd (qvd)];
Next File
Hi thanks for idea.
Hope it will be faster than using wildmatch,
Thanks in advance