Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have a file with the following naming convention :
DailyFileUpload_20171201011506.csv
Is it possible to extract the following into a temp table ::
DailyFileUpload as filename
20171201 as filenamedate
many thanks
Phil
use filename()
mid(subfield(filename(),'_',2),1,8)
Regards
May be like this
LOAD SubField(FileBaseName(), '_', 1) as filename,
Date#(Left(SubField(FileBaseName(), '_', 2), 8), 'YYYYMMDD') as filenamedate
...
From ....
or left(subfield(filename(),'_',2),8)