Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I build a monthly qvd file that gets added to a YTD qvd file. This month I added a new field to the current month but past months do not have it. This new field is not showing up in the YTD file. How do I get it to show up in the YTD file? The new field does show up in the 201604_Sales files.
Monthly files are named 201601_Sales, 201602_Sales, 201603_Sales, 201604_Sales (201604_Sales is the one with the new field added)
YTD file is called 2016_SalesYTD
Here is what I am doing:
SalesYTD:
LET vStartMonth = num(month(yearstart($(vToday))),'00');
LET vCurrentMonth = num(month($(vToday)),'00');
LET i = $(vCurrentYear);
for x = $(vStartMonth) to $(vCurrentMonth)
LET vYearMonth = $(vCurrentYear) & num($(x),'00'); |
SalesYTD:
LOAD *
FROM Datasources\$(vYearMonth)_Sales.qvd (qvd);
next
STORE * FROM InvHistDetails INTO Datasources\$(vCurrentYear)_SalesYTD.qvd;
DROP TABLE SalesYTD;
Where do you create InvHistDetails table?
Are you sure your QVD contains the latest month data at all?
I would assume that the latest month doesn't get concatenated to the other month's data, so you end up with a missing month, not only a missing field.
I would consider using a forced CONCATENATE to get all fields and records into one table.