Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

hansdevr
Contributor II

Date problem in Where clause

While trying to work out incremental load on a QVD, I ran into the following problem:

First I created a QVD file with all records. Then I do a database read and store the result in a resident table. To concatenate new records into my QVD, I do a where clause on the resident table, finding records which have been added since last QVD creation time.

So, I read the creation time into a variable, like this (and this works fine):

Let vAanmaaktijd = num(QvdCreateTime('$(vQVDfolder)TopDesk\QVD TopDesk Versionated.qvd'));

The contence of $(vAaanmaaktijd) = 42844,561724537

After the database load I try to do the following:

Nieuwe_records:
Concatenate (Stamtabel) LOAD * Resident TopDesk_Wijzigingen
where num([Datum aanmaak]) > $(vAanmaaktijd);
Drop table
Nieuwe_records;

When reloading I get the following error message:

What am I doing wrong? the field Datum aanmaak (creation date) is in format DD-MM-YYYY hh:mm:ss

Tags (1)
1 Solution

Accepted Solutions
aarkay29
Valued Contributor

Re: Date problem in Where clause

Try with single quotes

where num([Datum aanmaak]) > '$(vAanmaaktijd)'

3 Replies
aarkay29
Valued Contributor

Re: Date problem in Where clause

Try with single quotes

where num([Datum aanmaak]) > '$(vAanmaaktijd)'

MVP
MVP

Re: Date problem in Where clause

May be use single quotes around your variable

Concatenate (Stamtabel)

LOAD *

Resident TopDesk_Wijzigingen
Where num([Datum aanmaak]) > '$(vAanmaaktijd)';

hansdevr
Contributor II

Re: Date problem in Where clause

You were of course BOTH right!!

Thnx guys!! You really helped me out!!