Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Experts
I got Sales QVDs in a folder from 2014
Sales_2014_01
Sales_2014_02
Sales_2014_03
Sales_2014_04
Sales_2014_05
Sales_2014_06
Sales_2014_07
Sales_2014_08
Sales_2014_09
Sales_2014_10
Sales_2014_11
Sales_2014_12
Now I want to chose the data only from 2014_05
I dont want to load the QVDs one by one
Is there a dynamic Way of Loading it from 2014_05
Please Suggest
What about
LOAD *
FROM Sales_2014_05.qvd(qvd)?
I'm assuming you want to calculate which QVD to load based on the current date?
LET vQvd = 'Sales_' & date(today(1),'YYYY_MM') & '.qvd');
LOAD * FROM $(vQvd) (qvd);
-Rob
Hi John
You can load all files QVD and add field 'NameQVD', separate in Set Analyses.
Ex.
LOAD *
, filename() AS File
FROM Sales_2014_*.qvd(qvd);
Best Regards,
Tiago Ferrucio
HI
I want only the QVDs from May
ie., from 2014_05
2014_05 is a folder or a single QVD?
You want the QVDs from 2014_05 forward.
FOR EACH file in 'C:\mydir\*.qvd'
IF '$(file)' >= C:\mydir\2014_05.qvd' THEN
LOAD * FROM [$(file)} (qvd);
ENDIF
NEXT file
You may have to actually extract the YYYY_MM portion to do a valid comparison, but hopefully the loop gets you started.
-Rob
HI Rob
Thank You
Let me check with this Method
HI Anjos
Its a single QVD
LOAD * From sales.QVD where fieldname=2014_05;