Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Pujitha
Contributor II
Contributor II

Script

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

7 Replies
lockematthewp
Creator II
Creator II

After loading those files, QlikView will automatically connect them based on matching column names. If you want to remove some of the connections (like to remove synthetic keys), just change the script with the as keyword like:

Load [Name],

       [Opt] as Whatever,

      ….. 

Pujitha
Contributor II
Contributor II
Author

Can you make it little clear. If I load all the files it will come as single file??

lockematthewp
Creator II
Creator II

They will still be 4 separate tables. But QlikView will automatically make associations between them wherever the column names match. You can load them all and then press CNTRL + T and it will show you a picture of how the tables are connected. There is really no need to put them all in one table as QlikView will pretty much treat it that way anyways.

Pujitha
Contributor II
Contributor II
Author

I am getting synthetic keys. I did concatenate between tables. Even though the column name is same for some but data is different.  

Brett_Bleess
Former Employee
Former Employee

Pujitha, check out the following Design Blog post link, I think it will help you get your head wrapped around the synthetic keys.  

https://community.qlik.com/t5/Qlik-Design-Blog/Synthetic-Keys/ba-p/1472634

The other two functions that will likely come in handy to clean up the synthetic keys would be the following:

https://help.qlik.com/en-US/qlikview/April2019/Subsystems/Client/Content/QV_QlikView/Scripting/Scrip...

https://help.qlik.com/en-US/qlikview/April2019/Subsystems/Client/Content/QV_QlikView/Scripting/Scrip...

Hopefully that helps get you on the right track on this one.

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.
marcus_malinow
Partner - Specialist III
Partner - Specialist III

If you want the end result to be a single table, use forced concatenation

 

Table:

LOAD 

[field list]

FROM [Source 1]

 

CONCATENATE (Table)

Load 

[field list 2]

FROM [Source 2]

 

etc, etc.

Brett_Bleess
Former Employee
Former Employee

Duplicate thread, see the following for other posts: https://community.qlik.com/t5/New-to-QlikView/scripting/m-p/1604193/highlight/false#M378198

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.