Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Qlik Analytics Tour 2020 Online. Begins August 10th. Register Today
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
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
Highlighted
Creator II
Creator II

Re: scripting

 

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!!!

 

Highlighted
Contributor II
Contributor II

Re: scripting

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

Highlighted
Creator II
Creator II

Re: scripting

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 *;

 

 

 

Highlighted
Digital Support
Digital Support

Re: scripting

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.