Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi QV,
I've a folder that contains excel sheet which keep coming every night. I have to use only the Excel Sheet automatically by 02.15 PM.
Here is my source folder.
Can you help me write in the script to just pull files from a certain time period maybe?
Can anyone help me on this please?
Use filetime() to get modification time. Try like:
Load
*
From yourpath\*.xls where filetime()>yourtime;
Hi Tresesco,
this is my source path. Help me out.
**************************************
FROM
(txt, codepage is 1252, embedded labels, delimiter is '\t', msq);
***********************************************
Try like:
FROM
(txt, codepage is 1252, embedded labels, delimiter is '\t', msq) where hour(filetime())>2;
Hi,
It is reading all the excel sheet which ever earlier than 02 PM. I just want to load the only excel sheet with in that time frame. Only one excel sheet. Could you help me on this please?
Ex: 1.45PM to 2.15 PM
where frac(filetime())>time#('1:45', 'h:mm') and frac(filetime())<time#('2:15', 'h:mm')
Modified.
Use something like
FOR each File in filelist('SourcePath')
T:
LOAD
FileBaseName() As fname,
FileTime() AS filtime
FROM [$(File)] ;
NEXT File
Let vMaxDate = Peek('filtime', -1, 'T');
Hi,
It is not loading any records. Just 0 records loaded showing.
Hope you understood the logic. There might be some basic glitch in your code segment, try to find that with trial and error.
Hi Manoj,
how to try your login? Help me out.
**************************************
FROM
(txt, codepage is 1252, embedded labels, delimiter is '\t', msq);
***********************************************