Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have all the application names and their logs present with the same name folder in TableA and i want to search the logs and read them for all applications .
I want my loop to run for each application in tableA and put their stats into TableB where column appu contains path of the log file and ApplicationName1 contain name of the application .
Below loop is running once only and giving me details for 1 application . Can anybody please help.
for i=0 to i= NoOfRows(tabaleA)-1;
//for each file in '$(tabaleA)'
let rty=Peek('appu',$(i),'tabaleA');
tableB:
first 1
LOAD
Peek('ApplicationName1',$(i),'tabaleA')&Date(today(),'DD/MM/YYYY hh:mm:ss') & if (FileTime('$(rty)\DocumentLog.txt')>'01/06/2018 13:28:52','Evening','Morning') as PKey,
Date(FileTime('$(rty)\DocumentLog.txt'),'hh:mm:ss') as EndTime,
SubField(@3,' ',2) as startTime,
time((Date(FileTime('$(rty)\DocumentLog.txt'),'hh:mm:ss') - SubField(@3,' ',2)),'hh:mm:ss') as duration,
@1,
@2,
@3
FROM
[$(rty)\DocumentLog.txt]
(txt, utf8, no labels, delimiter is '\t', msq);
NEXT i;
for i=0 to i= NoOfRows(tabaleA)-1; should be:
for i=0 to NoOfRows(tabaleA)-1;