Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
Iam looking for logic where iam trying to append the data into QVD file.
I will have the new file every hour or day which will be replaced with existing one.
I have a file which has data as below:
Ex: for 10.3.2017 (Samplefile.xlsx)
Sno | Name | IC | Date | CardNumber |
7 | XXX | 123 | 10-03-17 | 123456 |
8 | YYY | 456 | 10-03-17 | 976544 |
Next day Ex: 11.3.2017(Samplefile.xlsx) i received a file:
Sno | Name | IC | Date | CardNumber |
1 | XXX | 123 | 11-03-17 | 123456 |
2 | YYY | 456 | 11-03-17 | 976544 |
3 | ZZZ | 676 | 11-03-17 | 678678 |
I need to concatenate /append the data into 1 QVD file.
Created a TempQvd and tried to merge into 1 QVD, but i recevie the error : Table not Found. Concatenate(Append Data) Load * from Transactions.qvd.
Logic is as below:
vTransqvdExists = QVDpath;
LOAD * FROM Samplefile.xlsx;
If $(vTransqvdExists) then
//if exists
Store Trans into Transactions.qvd;
Temptrans:
LOAD * from Transactions.qvd;
STORE Temptrans into tempTrans.qvd;
AppendData:
LOAD * FROM tempTrans.qvd;
Concatenate (AppendData)
LOAD * from Transactions.qvd;
STORE AppendData into Transactions.qvd;
ELSE
//First time this qvd is created
Store Trans into Transactions.qvd;
ENDIF
Can anyone suggest where the code is wrong?
regards
sudhakar
Hi,
I tried changing the code as you have specified. But observed the old data is being cleared off in old QVD. only the new data gets loaded.Any idea on this?
Hi Sudhakar,
Can you try the below code
If $(vTransqvdExists) then
//New Data
Concatenate(Trans)
LOAD * from G:\QPublish\Transactions.qvd;
Store Trans into G:\QPublish\Transactions.qvd;
ELSE
Store Trans into G:\QPublish\Transactions.qvd;
ENDIF
Thanks Sandhya,
This codes works. Thanks a lot.
No problem