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: LOADdistinct * from \\HACQVPROD\QVProd\PRODUCTION\DATA\INVOICES\Daily\Invoice_HDR.qvd(qvd); concatenate addLoaddistinct * FROM\\HACQVPROD\QVProd\PRODUCTION\DATA\INVOICES\INVOICE_HEADER_2016*.qvd(qvd) whereDate(FileTime(), 'DD/MM/YYYY') >= Today() -1; Invoice_Lines: loaddistinct * from \\HACQVPROD\QVProd\PRODUCTION\DATA\INVOICES\Daily\Invoice_LIN.qvd(qvd); concatenate addLoaddistinct * FROM \\HACQVPROD\QVProd\PRODUCTION\DATA\INVOICE LINES\INVOICE_LINES_2016*.qvd(qvd) whereDate(FileTime(), 'DD/MM/YYYY') >= Today() -1;