Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am trying to load data from using the peek statement as follows:
Temp1:
NoConcatenate
First 3 Load * Resident Temp Order by QVD_Modified_Date desc; //Temp contains file paths with file names (QVD_NAME) and Modified dates to QVDs//
For vNum = 0 to 2 //tried 1 to 2 as well//
let vStart=Peek('QVD_NAME',$(vNum),'Temp1';
load * from [$(vStart)](qvd);
Next
Peek just doesn't want to recognise the variable $(vNum). I have tried '($vNum)', '$vNum', vNum, $vNum, but nothing seems to work yet if I use let vStart=Peek('QVD_NAME',0,'Temp1' then it works perfectly. Just doesn't seem to like variable as the row - anyone have any ideas?
...and the honest answer will be you can't. It will work however if you use the do while loop
e.g.
set NoOfQvds=3;
let vNum=1
do while vNum < $NoOfQvds)
let vStart=Peek('QVD_Name',S(vNum),'Temp1');
load * from [$(vStart)](cvd);
let vNum=$(vNum)+1
loop
...and the honest answer will be you can't. It will work however if you use the do while loop
e.g.
set NoOfQvds=3;
let vNum=1
do while vNum < $NoOfQvds)
let vStart=Peek('QVD_Name',S(vNum),'Temp1');
load * from [$(vStart)](cvd);
let vNum=$(vNum)+1
loop