Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi I have incremental reload with where not exists syntax.
But I am getting only one record for the history.
I have been doing WHERE NOT EXISTS for many times, this is the first time I've seen this.
//today
LOAD Account,
Blalance,
PRCS_DTE
FROM
[..\03_QVD\Table_Incr.qvd]
(qvd);
//History
LOAD Account,
Blalance,
PRCS_DTE
FROM
[..\03_QVD\Table.qvd]
(qvd)
WHERE NOT EXISTS (PRCS_DTE)
;
That's because the symbol table will be updated as soon as the first record with a new PRCS_DTE value is loaded in (i.e. it is updated during the LOAD, not at the end of the statement).
Hence WHERE NOT EXISTS returns false for any following record with the same value.
Try
LOAD Account,
Blalance,
PRCS_DTE,
PRCS_DTE as PRCS_TODAY
FROM
[..\03_QVD\Table_Incr.qvd]
(qvd);
//History
LOAD Account,
Blalance,
PRCS_DTE
FROM
[..\03_QVD\Table.qvd]
(qvd)
WHERE NOT EXISTS (PRCS_TODAY, PRCS_DTE);
DROP FIELD PRCS_TODAY;
That's because the symbol table will be updated as soon as the first record with a new PRCS_DTE value is loaded in (i.e. it is updated during the LOAD, not at the end of the statement).
Hence WHERE NOT EXISTS returns false for any following record with the same value.
Try
LOAD Account,
Blalance,
PRCS_DTE,
PRCS_DTE as PRCS_TODAY
FROM
[..\03_QVD\Table_Incr.qvd]
(qvd);
//History
LOAD Account,
Blalance,
PRCS_DTE
FROM
[..\03_QVD\Table.qvd]
(qvd)
WHERE NOT EXISTS (PRCS_TODAY, PRCS_DTE);
DROP FIELD PRCS_TODAY;
Thank you Stefan, what does "symbol table" mean?
That's where the distinct field values are stored:
Thank you very much! Tremendously helpful!
Hello Stefan,
I had a similar issue as Jessica today and I could adapt your solution to work for me.
Thank you, very much appreciated.
hi
I created the new field but i still have the same problem.
I have a join statement in my first table, maybe this is the problem?