Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear team
How do I create variable from
T1:
LOAD * INLINE [
CDate
01/31/2015
02/29/2015
03/31/2015
04/30/2015
05/31/2015
01/31/2015
02/29/2015
03/31/2015
04/30/2015
05/31/2015
01/31/2015
02/29/2015
03/31/2015
04/30/2015
05/31/2015
];
like
let vDT1 = COB_31012015.qvd;
let vDT1 = COB_28022015.qvd;
let vDT1 = COB_31032015.qvd; and like wise
Thanks for help
May be this:
T1:
LOAD * INLINE [
CDate
01/31/2015
02/29/2015
03/31/2015
04/30/2015
05/31/2015
01/31/2015
02/29/2015
03/31/2015
04/30/2015
05/31/2015
01/31/2015
02/29/2015
03/31/2015
04/30/2015
05/31/2015
];
For i = 1 to 15
LET vDT$(i) = Peek('CDate', -$(i), 'T1');
NEXT
All are vDT1 or you forgot to increment them? vDT1, vDT2... and so on?
May be this:
T1:
LOAD * INLINE [
CDate
01/31/2015
02/29/2015
03/31/2015
04/30/2015
05/31/2015
01/31/2015
02/29/2015
03/31/2015
04/30/2015
05/31/2015
01/31/2015
02/29/2015
03/31/2015
04/30/2015
05/31/2015
];
For i = 1 to 15
LET vDT$(i) = Peek('CDate', -$(i), 'T1');
NEXT
or maybe you want to do something in loop on every file?

T1:
LOAD * INLINE [
CDate
01/31/2015
02/29/2015
03/31/2015
04/30/2015
05/31/2015
01/31/2015
02/29/2015
03/31/2015
04/30/2015
05/31/2015
01/31/2015
02/29/2015
03/31/2015
04/30/2015
05/31/2015
];
For i=0 to NoOfRows('T1')-1
LET file = 'COB_' & date(date#(Peek('CDate', $(i), 'T1'), 'MM/DD/YYYY'), 'DDMMYYYY') & '.qvd';
trace ..... elab file $(file) .....;
// read file ? store ?
NEXT;
Hi Sunny
I appreciate for answer.
Thanks
Satish
Hi Maxgro
Nice solution
Thanks
Hi Satish,
Maybe you are looking for something like this (to be added after your load inline) :
I added a load distinct as there is duplicate date.
Load Distinct CDate Resident T1;
qFilesCount:
Load
count(CDate) as qCntDate
Resident T1;
Let qCntFiles = Peek('qCntDate',0,'qFilesCount');
FOR i=0 to $(qCntFiles)-1
Let vDt$(i) = 'COB_' & Date(Date#(Peek('CDate',$(i),'T1'),'MM/DD/YYYY'),'MMDDYYYY') & '.qvd';
NEXT
Drop tables qFileCount;
Regards
Hi Maxgro
I am getting unsorted order
I want like Jan, Feb, Mar. Here is uneven order
Thanks
you can find my .qvw and qvd test file in the attachments; to try, put all the files in the same dir
table is sorted by filedate desc, in the input box the variable with the last (more recent) file name

Hi Gilles
Still the sorting is issue, Thanks for follow up