Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
silambarasan
Creator II
Creator II

How to perform incremental Excel file loads where dates are written in Excel file names

How to do incremental load?  Extract date from file name for incremental

File Name:

SS_2016-01-31

SS_2016-02-01

Note:Day-1 file stored as qvd and then perform incremental load

gwassenaarhicswuehl

Message was edited by: Silambarasan M

16 Replies
Anonymous
Not applicable

when the load the new excel and where date> max date

marcus_sommer

I'm not sure if your statement:

Date(MakeDate(SubField(SubField(FileBaseName(),'_',4),'-',1),SubField(FileBaseName(),'-',2),SubField(FileBaseName(),'-',3))) as  Date

worked and it looked somehow different to your first example of the filenames but if they then use my suggestion.

Another point is the use of the variable which needs to be wrapped in single-quotes like:

Where ...  > '$(vMaxDate)';

- Marcus

silambarasan
Creator II
Creator II
Author

that is also i gave

Anonymous
Not applicable

you create the max date variable  to create the max  date in the script by using the peek function

example: let vmaxdate=peek(field name,-1, table name)

after that we can taken the new file to give the where date >vmaxdate

try in this way in this way you get the output

silambarasan
Creator II
Creator II
Author

I edit the subfield value also  but not works

silambarasan
Creator II
Creator II
Author

I already create variable which you are saying..just verify my script please

marcus_sommer

I have seen another syntax-issue within the variable-creation, instead of:

Let vMaxDate=peek('Maximum ',0,Add);

it must be:

Let vMaxDate=peek('Maximum',0,'Add');

- Marcus