Discussion Board for collaboration on QlikView Scripting.
I have following problem.
I have one Datasource with always adding data. If we send a new parcel, the table will be added:
The Problem ist, that the oldest entries (Date, Time) in that table will be deleted after a while. But I will keep them in QlikView.
So, I will try following:
Send1:LOAD DATE, TIME, WEIGHT, TIMESTAMPFROMC:\colli.qvd(qvd);Send2:CONCATENATE LOAD DATE&TIME as TIMESTAMPSelect DATE, TIME, WEIGHTFROM QS36F.PACKAGING WHERE SEND2.TIMESTAMP > SEND1.TIMESTAMP;STORE * FROM Send2 INTO C:\colli.qvd
LOAD DATE&TIME as TIMESTAMP
WHERE SEND2.TIMESTAMP > SEND1.TIMESTAMP;
STORE * FROM Send2 INTO C:\colli.qvd
But I do not know how to do it right and I can not find anything in the web about it.
I need to compare the timestamp from table 2 (Send2) with the timestamp in Table 1 (Send1) to get only the data from table "Send2" which is not contained in table "Send1".
Can soembody help me?
I appreciate your fast help.
You can search for Incremental Scenario's, If you want to store that data into QlikView.
Here is the Link
thank you for your answer,
But I can not transfer these examples into my script.
Can you help me by using my script for the solution?
Hi Try This:
Send1:LOAD DATE, TIME, WEIGHT, TIMESTAMPFROMC:\colli.qvd(qvd);
DATE&TIME as TIMESTAMPSelect DATE, TIME, WEIGHTFROM QS36F.PACKAGING WHERE NOT Exists(TIMESTAMP);STORE * FROM Send1 INTO C:\colli.qvd
Maybe something like this:
LOAD DATE, TIME, WEIGHT, TIMESTAMP
FROM C:\colli.qvd (qvd);
LOAD max(TIMESTAMP) as MaxDT resident Send1;
LET vMaxDT = peek('MaxDT');
DROP TABLE Temp;
SELECT DATE, TIME, WEIGHT, DATE+TIME TIMESTAMP
WHERE (DATE+TIME) > $(vMaxDT);
STORE Send1 INTO C:\colli.qvd;
Note: You'll have to create a proper timestamp to be able to compare with. Date+Time or Date&Time is probably not good enough.
with your solution I get following Error message:
Not expectet "TIMESTAMP".
What can I do?
I have the problem by combining Date and Time together in the WHERE command.
I tried following, but it is not working:
WHERE (dat003 CONCAT uhr003) > $(vMaxDT) and VERAKZ=3;
STORE * from Versendet1 into \\dufile1\dentaldaten\QlikView\QVD\LieferantenQVD\Packstuecke.qvd;
Do you have any idea???