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: 
Pujitha
Contributor II
Contributor II

scripting

Hi,

I have 4 files which I need to concatenate to one. In one file I have like

Name   Opt  loc  Cod    id    dig      Lb     .Gop.      ....... some other columns

code     0         0         24     1    exx    .....         .....         .....

prof       1        0         43     2     xer    ....          ...            ..

stud      0        0        34      3     iop     ....        ...              ....

Another table:

loc     Cod   Lb  id  gop(as op) ..............here  and so on other columns 

diff data in Lb column

another table:

Et   loc    Cod    Lb    id 

another table:

Et st  status  Lb  id  loc

I need to append all these tables to one pls let me know this clearly from start to end how to do. Please let me know asap

4 Replies
Marcos_rv
Creator II
Creator II

 

try this:

table1:

load 

name ,

opt ,

loc,

cod,

id,   

dig,

lb,

gop

from table1.qvd;    

 

concatenate(table1)

load

loc,

cod,

lb, 

id,

gop(as op)

from table2.qvd;    

 

 

concatenate(table1)

load

et,

loc,

cod,

lb as lb_table3,   

id

from table3.qvd;    

 

 

concatenate(table1)

load

et,

 st, 

status,

 lb, 

id,

 loc

 

from table3.qvd;    

 


now all the tables are going to be concatenated in a single table, now if you know that the keys in each table are unique, you could use a left join or join to join them, remember that Qlikview relates tables by field names, so You have to be careful not to have tables that generate 1 to many relationships.

regards!!!

 

Pujitha
Contributor II
Contributor II
Author

I need to join based on id. Because in remaining columns which are having same number there will be the repetition.So based on  id we need do join all the 4 tables as one. Id is the unique  key.Please let me know

Marcos_rv
Creator II
Creator II

qualify *;

unqualify id;

 

table1:

load 

name ,

opt ,

loc,

cod,

id,   

dig,

lb,

gop

from table1.qvd;    

 

table2:

join(table1)

load

loc,

cod,

lb, 

id,

gop(as op)

from table2.qvd;    

 

 

table3:

join(table1)

load

et,

loc,

cod,

lb as lb_table3,   

id

from table3.qvd;    

tabla4:

join(table1)

load

et,

 st, 

status,

 lb, 

id,

 loc

 

from table4.qvd;    

unqualify *;

 

 

 

Brett_Bleess
Former Employee
Former Employee

Duplicate thread, see https://community.qlik.com/t5/QlikView-Scripting/Script/m-p/1603816#M95950 for other posts.

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.