Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Save $650 on Qlik Connect, Dec 1 - 7, our lowest price of the year. Register with code CYBERWEEK: Register
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Load data based on QVD data

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!

3 Replies
Not applicable
Author

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;

Not applicable
Author

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.

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP