Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I'm having issue when I set variable($p) in date. I want to read file for today's date and store into 1 QVD file.:
vToday = Date(Today(), 'DD-MM-YYYY');
//vToday=14-03-2016
LET p = $(vToday);
//p=-2005
Tmp_Table:
LOAD *
FROM
[..\..\FileName_$(p).xls]
STORE Tmp_Table into ..\..\_$(p).QVD;
DROP Table Tmp_Table;
I able to get vToday value, but when I call the variable in p I get the value as '-2005'. How can I solve this P value.
Thanks a lot !
Dear Syashairi,
Kindly find attached App, for quick reference script is given below.
--
LET vToday = Date(Today(), 'DD-MM-YYYY');
LET p = '$(vToday)';
Table1:
LOAD Product,
Sales
FROM
[Sales_$(p).xlsx]
(ooxml, embedded labels, table is Sheet1);
STORE Table1 into $(p).qvd;
DROP Table Table1;
Kind regards,
Ishfaque Ahamed
Try this may be:
May be try this:
vToday = Date(Today(), 'DD-MMM-YYYY');
//vToday=14-Mar-2016
LET p = $(vToday);
//p=-2005
Tmp_Table:
LOAD *
FROM
[..\..\FileName_$(p).xls]
STORE Tmp_Table into ..\..\_$(p).QVD;
DROP Table Tmp_Table;
Dear Sunny,
I get this error :
Cannot open file 'D:\..\FileName_.xls' The system cannot find the file specified.
Forgot to mention my filename is File_DD-MM-YYYY.
Dear Syashairi,
Kindly find attached App, for quick reference script is given below.
--
LET vToday = Date(Today(), 'DD-MM-YYYY');
LET p = '$(vToday)';
Table1:
LOAD Product,
Sales
FROM
[Sales_$(p).xlsx]
(ooxml, embedded labels, table is Sheet1);
STORE Table1 into $(p).qvd;
DROP Table Table1;
Kind regards,
Ishfaque Ahamed
Hi Ishfaque,
It works, Thanks so much!