Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi,
I have a program that shows an overview of data but every month i get a new datafile with the most recent data in it. Is it possible to load the newest file without always having to manualy choose the sourcefile?
example: file1: 200905.xls; file2: 201003.xls; file3: 201102.xls.
load *
from MOSTRECENT.xls
Is there a way to check the date in the filename and load the most recent? or do i have to add a field date in the xlsfile?
Hi Reignfire,
This is what Incremental load is about.
See the below script to get an idea. By this you are able to Update and Insert.
Let ThisExecTime = Now();
QV_Table:
SQL SELECT PrimaryKey, X, Y FROM DB_TABLE
WHERE ModificationTime >= #$(LastExecTime)#
AND ModificationTime < #$(ThisExecTime)#;
Concatenate LOAD PrimaryKey, X, Y FROM File.QVD
WHERE NOT EXISTS(PrimaryKey);
Inner Join SQL SELECT PrimaryKey FROM DB_TABLE;
If ScriptErrorCount = 0 then
STORE QV_Table INTO File.QVD;
Let LastExecTime = ThisExecTime;
End If
Hope it helps
sravan