Hi guys,
I need to write one script in which i can store month on month data into QVDs like just to append only.
e.g.
In Nov 18, I am loading data once and store few records in to QVD
Say: Load * Inline
[Field1,Field2
A,10
B,20
C,30];
Now this data is for Nov18 only..
Now In Dec18 Some new data would come,may come with existing record in Nov18 and New Records as well..
Say: Load * Inline
[Field1,Field2
A,10
D,40
E,50];
Now my output for the month of Nov and Dec is concatenation of Nov18 Data and Dec18 Data and this loop will go on for upcoming months..
Pls. note. in source i will find only latest month data.
Pls. suggest how i can achieve it
Regards
Abhay
Something like this:
MyTable:
LOAD Field1, Field FROM ...source_table... ;
If QvdCreateTime('C:\MyDir\MyFile.qvd') >0 Then CONCATENATE (MyTable) LOAD * FROM [C:\MyDir\MyFile.qvd] (qvd) WHERE NOT Exists(Field1); EndIf STORE MyTable INTO [C:\MyDir\MyFile.qvd] (qvd);
Hi Gysbert,
Thanks for your reply.. In suggested script i am loosing same field key output.
let say in month i am getting 3 record and in dec i am getting 7 records than consolidated 10 records should come as output with month tagged in to it.. like 3 records for nov18 and 7 Records for Dec18 and so on.
Regards
Abhay
Any suggestion guys??