Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
hansdevr
Creator III
Creator III

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

1 Solution

Accepted Solutions
aarkay29
Specialist
Specialist

Try with single quotes

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

View solution in original post

3 Replies
aarkay29
Specialist
Specialist

Try with single quotes

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

sunny_talwar

May be use single quotes around your variable

Concatenate (Stamtabel)

LOAD *

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

hansdevr
Creator III
Creator III
Author

You were of course BOTH right!!

Thnx guys!! You really helped me out!!