Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

issue with multiple 'concatenate's (for incremental loading)

Hi guys,

I have two tables and two qvds (say table1, table2 and qvd1,qvd2)

I am trying to concatenate the tables with respective qvds

ex:

table1

concatenate

qvd1

and

table2

concatenate

qvd2

But my problem is only first concatenate is working. The second concatenate, instead of concatenating (or appending), it is replacing the qvd2 with the table2 data. I thought there could be something wrong with the second concatenate statement. But when I swapped the statements like

table2

concatenate

qvd2

and

table1

concatenate

qvd1.

Now the table2 and qvd2 concatenate is working fine but not the other one.

So I want to ask if anybody has tried using multiple concatenate statements and has anybody faced this kind of issue. Does anyone have a solution?

Thanks in advance

1 Solution

Accepted Solutions
Not applicable
Author

oops.....that was my bad. i was using same field for both the tables and qvds and that was the reason for the wrong results. thanks anyways guys for responding.

View solution in original post

6 Replies
johnw
Champion III
Champion III

I don't know what the problem is. However, I ALWAYS specify which table I wish to concatenate to in order to help avoid problems. So for instance:

Table1:
LOAD some fields
FROM wherever;
CONCATENATE (Table1)
LOAD some fields
FROM something.qvd;

Table2:
LOAD some more fields
FROM somewhere;
CONCATENATE (Table2)
LOAD some more fields
FROM somethingelse.qvd;

Not applicable
Author

Hi John, Thanks for the reply. I tried specifying the name. It did not work though.

johnw
Champion III
Champion III

I'm not sure, then. Can you post the script?

Not applicable
Author

I agreed wit Mr Jhon.........

I think there is some mistake from your side at script level.

you should share the sample qvw application

Not applicable
Author

oops.....that was my bad. i was using same field for both the tables and qvds and that was the reason for the wrong results. thanks anyways guys for responding.

dmohanty
Partner - Specialist
Partner - Specialist

Hi John,

Can you please help out in this case:

I have to concatenate the QVDs from different folders. But the problem is that, when the QVDs from 2nd folder are coming, they are replacing the QVDs generated from 1st folder. My aim is to concatenate the QVDs from both the folders. Please suggest. Do I need to mention CONCATENATE somewhere?

Below is my code:

set errormode = 0;

let qvdpath = 'C:\Users\DICKY\Desktop';

for each vPlant in  '$(qvdpath)\MAP\' , '$(qvdpath)\HPG\'

for each qvd_file in FileList('$(vPlant)*')

let QVDName = subfield('$(qvd_file)','\',6);

$(QVDName):

load

*

    

FROM

$(vPlant)$(QVDName)

(qvd);

store $(QVDName) into C:\Users\DICKY\Desktop\Test QVDs\$(QVDName);

drop Tables $(QVDName);

next

next

EXIT Script;