Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Load the most recent file into Qlikview based upon its last modified date

I am attempting to load only the most recent file from a folder into Qlikview based upon the date that it was placed in the folder. Below is my current data. Even with the where statement, it still scans in every file from the folder. Any idea on how to make this work? Thank you!

INVOICE_HEADER_2016_Oct_12_060501.qvd is the file format.


Invoice_Header:
LOAD distinct *
from \\HACQVPROD\QVProd\PRODUCTION\DATA\INVOICES\Daily\Invoice_HDR.qvd(qvd);

concatenate
add Load distinct *
FROM \\HACQVPROD\QVProd\PRODUCTION\DATA\INVOICES\INVOICE_HEADER_2016*.qvd(qvd)
where Date(FileTime(), 'DD/MM/YYYY') >= Today() -1;


Invoice_Lines:
load distinct *
from \\HACQVPROD\QVProd\PRODUCTION\DATA\INVOICES\Daily\Invoice_LIN.qvd(qvd);

concatenate
add Load distinct *
FROM \\HACQVPROD\QVProd\PRODUCTION\DATA\INVOICE LINES\INVOICE_LINES_2016*.qvd(qvd)
where Date(FileTime(), 'DD/MM/YYYY') >= Today() -1;

1 Reply
Not applicable
Author

Does anyone know what I am doing incorrect or can anyone provide a link to a possible solution?