Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all!
I am trying to run this script to create monthly qvd by reading daily qvd file. however, i hit error. this is the error, which i dont know how to fix it. Please help 🙂
My script is as below:
Month:
Load Distinct
UPPER(Month(CAL_DAY)) & '-' & Year(CAL_DAY) as MONTH_YEAR
FROM [lib://QVD/Sales/SUM_SALES_DAILY_2021*.qvd](qvd);
Let vCount = noofrows('Month');
LET vYearMonth = peek('MONTH_YEAR ',$(i),'Month');
LET vYear = right($(vYearMonth),4);
LET vMonth = left($(vYearMonth),2);
$(vYearMonth):
Load * from
FROM [lib://QVD/Sales/SUM_SALES_DAILY_2021*.qvd](qvd)
where Month(CAL_DAY) = $(vMonth) AND year(CAL_DAY) = $(vYear);
//Store $(vMonth) into D:\DAILY_REPORT_$(vYYYY)$(vMonth).qvd;
STORE $(vYearMonth) INTO [lib://QVD/Sales/HISTORICAL/MONTHLY_SUM_SALES_ARTICLE_$(vYearMonth).qvd](QVD);
Drop Table $(vYearMonth);
Next
Hi @jim_chan
Looks like it does like what is Set in the variable $(i)
Add this line and relaod should see the value in the variable and be able to correct from there
TRACE $(i)
LET vYearMonth = peek('MONTH_YEAR ',$(i),'Month');
LET vYear = right($(vYearMonth),4);
LET vMonth = left($(vYearMonth),2);
ok i m trying it now.
seems like the same. after added the TRACE.