Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have a set of QVDs having the same Data Structure for different months (some months may be missing), like this below:
Fact_Jan2014.qvd
Fact_Feb2014.qvd
Fact_May2014.qvd
Fact_July2014.qvd
...
Fact_Dec2014.qvd
Now the target is to concatenate all the QVDs into a single QVD called Fact.qvd. Could you please help doing it using a For Loop or any other ways?
Regards!
For file in filelist ('Fact*.qvd')
T1:
LOAD * from $(file)
next
Store T1 into newqvd.qvd(qvd);
For file in filelist ('Fact*.qvd')
LOAD * from $(file)
next
Thank you Anjos!
How you are storing the same into QVD?
For file in filelist ('Fact*.qvd')
T1:
LOAD * from $(file)
next
Store T1 into newqvd.qvd(qvd);
Actually, there is no need for a loop in this particular case, simply
LOAD * FROM Fact_*.qvd (qvd);
I just did like this below and getting the error (highlighted)
FOR EACH vFile in FileList('$(vMonthQVDPath)\Metric\PO_Min*.qvd')
CONCATENATE
PO_Min:
LOAD *
FROM [$(vFile)] (qvd);
NEXT vFile
Store PO_Min into $(vMonthQVDPath)\Metric\PO_Min.qvd;
FOR EACH vFile in FileList('E:\Med_Supplier_QV_Files\Source\Medical_QVD_Generators\Snapshot QVDs\Metric\PO_Min*.qvd')
1/26/2015 5:12:05 PM: 0031 CONCATENATE
1/26/2015 5:12:05 PM: 0032
1/26/2015 5:12:05 PM: 0033 PO_Min:
1/26/2015 5:12:05 PM: 0034 LOAD *
1/26/2015 5:12:05 PM: 0035 FROM
1/26/2015 5:12:05 PM: 14 fields found: Supplier ID, Month_Year, Month/Year, PLANT_ID, PROD_KEY_NUM, MIN_NET_ORDER_VALUE_AMT, ORDER_UNIT_PO_QTY, APO_LOCATION_KEY_NUM, CLNDR_MTH_KEY_NUM, STD_COST_AMT, ROW_UPDATE_STP, FINAL_FCST_QTY_WKLY, Meet Min (Yes/No), Flag_PO_Min, General Script Error
1/26/2015 5:12:05 PM: Execution Failed
1/26/2015 5:12:05 PM: Execution finished.
Why did you put CONCATENATE there? They have different structure?
Yes Anjos,
MY Bad....The CONCATENATE created the problem!
Realized now..... Thank you for help