Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I tried loading data based on max date from file name.
While trying to call in a variable, it's not working.
Is there any way to loa
I think you should use a loop to load all file names in your table.
how your script do it ?
Post your script please. We can't see what you are doing wrong like this. And yes it is possible.
///////////
Load
date(date#(trim(left(subfield(FileName(),'DataFileName -',2),11)),'YYYY-MM-DD'),'DD-MM-YYYY') aS Source
From ExcelTable...
////////////
Let vMaxFileDate=date(max(Source,'MM/DD/YYYY'));
Hi
try this may be
Master:
ID,
date
from Master.qvd;
Max:
load max(date) as maxdate
resident Master;
Let vMax = peek('maxdate',0,'Max')
Drop table Max;
Transaction:
join(Master)
Load
ID,
date
From Transaction.qvd
where date >'$(vMax)';
let's try below code:
table_name:
Load
max( date(date#(trim(left(subfield(FileName(),'DataFileName -',2),11)),'YYYY-MM-DD'),'DD-MM-YYYY') ) as Source
From ExcelTable...
Let vMaxFileDate = Peek( 'Source', 0, 'table_name');
Eventhough I am getting the min date not the max Date. Here the max date is 2018-07-12
where date >= '$(vMax)'; Dont forget the '=' other wise it won't find anything can even discard '>' and also using the match function here would help a little bit with performance.
I think you should use a loop to load all file names in your table.
how your script do it ?
In file name only I have date. based on the date have to load the maximum date file only. Help me to resolve this in script
Load all file names first then get the part that has the date and max that. and then use it with wildcards to only load that date.