Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
could you please advise.
I am trying to load latest 6 file from a folder which is in the format as below
Temp:
LOAD *,
Date(Date#(SubField(Left(filename(),8),'YYYYMMDD'),'MM/DD/YYYY')) as Date,
filename() as FileName
FROM
(qvd);
STORE Temp into
I am not getting the required out put.
Made some other changes as well
Temp:
LOAD *,
Date(Date#(Right(FileBaseName(), 8), 'YYYYMMDD'), 'MM/DD/YYYY')) as Date,
FileName() as FileName
FROM
(qvd);
Try with FileBaseName() instead of FileName() as FileName as picks up the file extension... .qvd or .xlsx
Read more about here
Made some other changes as well
Temp:
LOAD *,
Date(Date#(Right(FileBaseName(), 8), 'YYYYMMDD'), 'MM/DD/YYYY')) as Date,
FileName() as FileName
FROM
(qvd);