Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Error while concatenating the data

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)

SnoNameICDateCardNumber
7XXX12310-03-17123456
8YYY45610-03-17976544

Next day Ex: 11.3.2017(Samplefile.xlsx) i received a file:

     

SnoNameICDateCardNumber
1XXX12311-03-17123456
2YYY45611-03-17976544
3ZZZ67611-03-17678678

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

13 Replies
Not applicable
Author

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?

Not applicable
Author

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

Not applicable
Author

Thanks Sandhya,

This codes works. Thanks a lot.

Not applicable
Author

No problem