Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello
I need to load data from SQL ODBC based on Date already loaded into a QVD.
The process would be like:
1) Check MAX(DateColumn) inside QVD
2) Load data from SQL ODBC where DateColumn in SQL table > MAX(DateColumn) in QVD
is this possible?
how would the script look like?
Thanks!
temp:
Load Date
from qvd;
res:
Load max(date) as MaxDate
resident temp;
let vMax=peek('MaxDate',-1,'temp');
Current:
select * from Sql table
where Date > vMax;
concatenate
load * from qvd;
Hi armando,
It sounds like you want to do something similar to an incremental load. If you would like all transactions where the date does not exist in your QVD though (and avoid duplicate loads based on your date column - as it seems you are), what could possibly be of use is a where not exists statement.
First Load your QVD table with DateColumn as qvdDate. Then in your SQL Load, include:
Where Not Exists (DateColumn, qvdDate)
Hope this helps,
Ian.
For more on incremental load, see http://qlikviewnotes.blogspot.com/2012/01/incremental-load-using-qlikview.html
-Rob