Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Is there any way to check the end of file??
I have a requirement like, we have a list of folders and inside each folder a text file will be there whose name is same in all the folders.
So I need to take data from those text files to Qlikview. Now I can fetch data from the text files but I need to have a field or a value to identify the end of each file.
I will be using that filed or value in an another table to check whether It came from same file or from a different file.
Is there any way to do this??
Thanks in advance.
Regards,
Leni Balakrishnan
The above load statement will give the min and max time of each file??
Yes. Try it out with a single file first to see what happens.
ok
It gives the max & min time by considering all data together and not for each file.
If you load your files in a loop then you should be able to get the min and max per file loaded. Can you post the script?
Hi,
Sorry for the late reply.
Actually It gave the min and max value of each file. I did a mistake so it considered min & max of all data together.
Now its working fine.
But with this how can I achieve my requirement??
If you have all the log data in one table and the start and end times in another, then you can join the two tables and have all the data together.
But in my requirement,
I have to take start time and endtime from same file as well as from different file.
Actually I am using the log file generated by the application for the appln currently I m working.
Using that I am calculating the time taken for each qvd to create. So I am taking the starttime as the previous store statements time and Endtime as Current store statement time. Like below:
12:00:01 tb1:
12:00:01 load* from xx.file;
12:00:01 store tb1 into file.qvd; => StartTime
12:00:01 tb1:
12:00:02 load* from xx.file;
12:00:02 store tb1 into file.qvd; => EndTime
So while taking like this from each file, I m getting a problem like the first log file finished its execution @ 11 PM and the 2nd log file (which might be of another days log file) starts at @ 4 AM so as per my logic it ll give a wierd answer. So I have a checkpoint like
if(FilePath = Previous(FilePath),Previous(StartTime), StartTime)
so here if the current file path is same as previous file path then the data is coming from same file so I m taking the previous time. If tat is not the case I m taking the current time.
To do this now I m using FileDir() but is there any other way to achieve this???
Thanks
test