Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have a qvd file that contains 3 years of data.
I want to store the 3 years data into 36 monthly files
currently my file is called TrxHist.qvd
I want to store them as
TrxHist201001.qvd
TrxHist201002.qvd
TrxHist201003.qvd
TrxHist201004.qvd
TrxHist201005.qvd
TrxHist201006.qvd
TrxHist201007.qvd
TrxHist201008.qvd
And so on!
The log file wont run for some reason I get this error message
IF vFullReload <> 1
I 'm assuming I need to set a variable called vFullReload?
Hi Alan,
first issue - the load statement after the TRACE needs to change.
WhateverTable_$(vYearMonthFound):
NOCONCATENATE LOAD *
RESIDENT WhateverTable
WHERE Year = num(left($(vYearMonthFound), 4))
AND Month = num(right($(vYearMonthFound), 2))
second issue - vYearMonthsFound doesn't look to be being populated. Can you look at it in your variables and see if it contains a value?
Hi Marcus,
I will have a look now thanks for your help
Regards
Alan
Hi Marcus,
Here is what I have now and its not working
Alan,
I assume you're getting the same error as before? That was indicating that the vYearMonthFound variable was not being populated, which also probably means that vYearMonthsFound is also not being populated. Can you check in your variables that these have been created, and if so could you let me know what values they contain?
If vYearMonths is not being populated, this indicates an issue with the initial load into the YearMonthsFound table. This is probably the line LOAD Year & '-' & Month as YearMonthFound. Do you have fields named Year and Month in your source data? If not you need to substitute in appropriate fields, or apply Year(FieldName) & '-' & Month(FieldName). You'll also need to make a similar change further down the script when doing the RESIDENT load from Transactions into Transactions_$(vYearMonthFound).
Also, do you need the capability to merge this data in with data in existing YearMonth QVD's? If not, you can simply remove the IF vFullReload block.
Hope this helps.
Marcus
Hi Marcus,
Yes I have Fields called Year and Month in my Data
I have removed the block for the full reload.
I will keep trying with it
Hi Alan,
persist and I'm sure you'll be rewarded!
I would be looking at the two variables vYearMonthFound and vYearMonthsFound.
Perhaps also try putting an exit script after the initial load into YearMonthsFound and examine the data in there.
Marcus