Discussion Board for collaboration on QlikView Scripting.
in a variable
let test = peek ('maxdata');
I have a decimal number (eg. 41535.528542708) that represents the date and time of a field stored in a QVD file.
To do an incremental load, I have to compare this value to a DateTime field, TBModified of Sql server 2008 R2, placed on a table SQL.
I can not, because of my ignorance, to write correctly the Where clause
Sql Select *
where TBModified> = test;
where the comparison is not done correctly and / or I get a conversion error.
thank you in advance for your help.
You got the reason right, it is about data format. Recommendation:- format your vaiable as date/time: let test = timestamp(peek ('maxdata'));- condition should be where TBModified> = '$(test)'
See if it helps.