Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have requirement to create year wise qvd dynamically.
EX:-if Source file:- Market.xls
In Market file have contain multiple year (Like year field contain 2010 to 2019 )
So i need to create qvd like :- Market_2010.qvd,Market_2011.qvd,....Market_2019.qvd
use a for loop something like below
TempYear:
load Distinct Year
resident Sales;
LET NumRows=NoOfRows('TempYear');
trace $(NumRows);
For n=1 To $(NumRows)
let vYear = Peek('Year',$(n)-1,'TempYear');
trace $(vYear);
TempSales:
NoConcatenate
load *
resident Sales where Year=$(vYear);
let vFileName='Sales-' & $(vYear);
store TempSales into $(vFileName).qvd (qvd);
drop table TempSales;
next n;
drop table TempYear;
use a for loop something like below
TempYear:
load Distinct Year
resident Sales;
LET NumRows=NoOfRows('TempYear');
trace $(NumRows);
For n=1 To $(NumRows)
let vYear = Peek('Year',$(n)-1,'TempYear');
trace $(vYear);
TempSales:
NoConcatenate
load *
resident Sales where Year=$(vYear);
let vFileName='Sales-' & $(vYear);
store TempSales into $(vFileName).qvd (qvd);
drop table TempSales;
next n;
drop table TempYear;