Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
LastUpdatedDate:
Load
max(Date("TDate")) as MaxDate;
Let varLastExec = Date(Peek('MaxDate', 0, 'LastUpdatedDate'));
Let varThisExec = Date(Now());
M:
LOAD
TDate,
"ANO",
BILL,
PAY,
"SDATE",
"DNO",
ADJ,
COM,
Cheq,
"mk",
"user",
tkey,
place,
"icode",
pkey;
Concatenate
Load TDate,
"ANO",
BILL,
PAY,
"SDATE",
"DNO",
ADJ,
COM,
Cheq,
"mk",
"user",
tkey,
place,
"icode",
pkey from lib://QVDs/xyz.qvd
where not Exists(thekey);
inner join
load tkey;
sql select tkey from PAN.T;
if ('$(ScriptErrorCount)') = 0 then
Store M into [lib://QVDs/temp.qvd](qvd);
Let varLastExec = '$(varThisExec)';
endif
SQL SELECT
"TDate",
"ANO",
BILL,
PAY,
"SDATE",
"DNO",
ADJ,
COM,
Cheq,
"mk",
"user",
tkey,
place,
"icode",
pkey
FROM PAN.T
where date(TDate) <= #'$varLastExec'#;
I was trying for increamental load, but there is an error occured while script is loaded, Is the above script correct to perform increamental load ?
Here tkey is correct one(key field)
so it should be
where not Exists(tkey);
Dear Baarathi,
The field thekey on the statement below:
where not Exists(thekey);
You should have loaded this field previously
Exists - script function ‒ Qlik Sense
the error persists even after that
Hi Baarathi,
what do you expect to achieve by that? Do you want to insert, update or delete the values?
As far as now i want to achieve insert, update and delete. For update i have use where not exists(tkey) and for delete i have used inner join
Want to achieve all the three
Baarathi
check this issue: Incremental load for beginner with example
i suppose, your order of tables is wrong
I hope you read your error...
Error suggest
"Unexpected Token : thekey"
I don't see field with name as thekey in your table
Just replace with tkey instead of thekey
Regards,
Did you got the same error or another one?
the error is because of the field which doesn't exist in Database(thekey)
Please make sure to place correct key field in where not Exists(tkey).
As my observation Tkey was available in database.