Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi all,
step 1:
i have a date excel file which as dates in it and i loaded it
ex:
Date:
12-jan-2018
13-jan-2018
step 2:
now i want set variable to store the above date
Step 3:
i want to load the file
ex:
load *
from [..//xyz_12jan2018.xsl]
but instead of file name 12jan2018.xsl i wanna use variable set on step 2, how can i achive that,it used happen dynamically
Can you share sample data?
As i see, file name is date and u want to extract date from File name and then what?
Perhaps something like below?
Sample:
LOAD * Inline [
Date
12-jan-2018
13-jan-2018
];
LET Variable = Peek('Date',0,'Sample');
LOAD Date1
FROM
Files.xlsx
(ooxml, embedded labels, table is '$(Variable)');
Instead third step your needed is this
ex:
load *
from [..//xyz_'$(Variable)'.xsl]
in step 1 i have loaded a Date file which contains Date field
and i want to set a variable(say the varible is 'v') to store the Date field
later i have one more file to load wich is loaded from [../xyz_2jan2018] but i want to load like [../xyz_$(v)]
Date:
load Date_New from Sample.xls
order by Date asc;
Let vDate = Peek('Date_New',0,'Date');
Final:
load * from [../xyz_$(vDate)];
thanks for the reply anil,but u used Peek('Date',0,'Sample'); what if i have lots of date in it
May be Loops using Peek() can deserve, But still not sure what your question ending up?
hi thanks for replay,the date formate in date field is 12-jan-2018 and in file name its like 12jan2018
is that fine if i use without converting date formate
refer shivesh singh replay my expectation is similar to that
I have not seen any difference from him and mine