Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
reporting_neu
Creator III
Creator III

Merge two tables into one

Hello, everyone,

I have two tables with dependent information.

In one table there are parts with more than one information and in the other table as well. I have to put these together in dependency. But how?

 

Table1:

RMNrProzessPositionCostItemGroupIDTarget timeCostItemGroupDateTime
1100011105,0production27.09.202108:00
1100021202shipping28.09.202110:00
2102211101,3production25.09.202107:20
2102211202,8shipping28.09.202108:00
3100011105,0production29.09.202108:30

 

Table2: (Master)

PartStatusDeadlineClerkTarget quantityDesired dateStatusIDWorkOrderType
1000in production30.09.2021HP10005.10.20211production
1000planned30.09.2021HP10005.10.20212production
1022in production30.09.2021HP7505.10.20211production
1022instructed30.09.2021HP7505.10.20213production
1000in production30.09.2021HP3605.10.20211refurbish

 

I have to assign the process from Table 1 to each part from Table 2. The part number and process number are identical. However, the process number can appear several times in table 1, just like the part number in table 2.

Several processes must therefore be assigned to a part (from Table 2 from Table 1).
Or the other way around, each process has several parts (from Table 1 to Table 2).

When I use a mapping, I can only assign one value at a time, but I don't get multiple dimensions.

Do you have any advice for me?

2 Solutions

Accepted Solutions
Qlik1_User1
Specialist
Specialist

@reporting_neu Try below

Master:

LOAD * Resident Table2;

LEFT JOIN(Master)

LOAD * Resident Table1;

DROP Tables Table1, Table2;

By above approach you have single table with all data.

View solution in original post

Qlik1_User1
Specialist
Specialist

@reporting_neu 

For example: Left Join Table1 ON Part = process --> We did this only, Qlik automatically creates a join based on matching fields name so Please change/rename the field name Part to Process in table 2 or Process to Part in table1.
Note - Qlik is case sensitive, so name needs to be exactly same.
After that this , join will work.

View solution in original post

11 Replies
Qlik1_User1
Specialist
Specialist

@reporting_neu Try below

Master:

LOAD * Resident Table2;

LEFT JOIN(Master)

LOAD * Resident Table1;

DROP Tables Table1, Table2;

By above approach you have single table with all data.

reporting_neu
Creator III
Creator III
Author

Many thanks for your response.

Unfortunately, when I use the join, I get all the characteristics for each part.

 

NoConcatenate
Master:
Load * Resident Table2;
Left join (Master)
Load * Resident Table1;
Drop Tables Table2, Table1;

 

A "RMNr" occurs a maximum of three times in the data record. After the join, it is available 1000 times. Each individual expression is then available for each individual data record. 😔

Qlik1_User1
Specialist
Specialist

Drop all non required fields from master table, If that does work use INNER JOIN

NoConcatenate
Master:
Load * Resident Table2;
INNER join (Master)
Load * Resident Table1;
Drop Tables Table2, Table1;

and drop all non required fields.

abhijitnalekar
Specialist II
Specialist II

Hi,

It looks very difficult to join the above two tables with Process and Part fields.

We need to create a composite key to join these two tables.

 

 

Regards,
Abhijit
keep Qliking...
Help users find answers! Don't forget to mark a solution that worked for you!
reporting_neu
Creator III
Creator III
Author

Unfortunately, it doesn't work with that either.

Don't I have to somehow link the data fields, like with SQL?

For example: Left Join Table1 ON Part = process

reporting_neu
Creator III
Creator III
Author

I feared that. But the key should be identical for both. But there is only the part and process that match.

Qlik1_User1
Specialist
Specialist

@reporting_neu 

For example: Left Join Table1 ON Part = process --> We did this only, Qlik automatically creates a join based on matching fields name so Please change/rename the field name Part to Process in table 2 or Process to Part in table1.
Note - Qlik is case sensitive, so name needs to be exactly same.
After that this , join will work.

abhijitnalekar
Specialist II
Specialist II

Hi @reporting_neu ,

 

Have you tried conactination? 

 

Regards,
Abhijit
keep Qliking...
Help users find answers! Don't forget to mark a solution that worked for you!
Qlik1_User1
Specialist
Specialist

@reporting_neu 
For example: Left Join Table1 ON Part = process --> We did this only, Qlik automatically creates a join based on matching fields name so Please change/rename the field name Part to Process in table 2 or Process to Part in table1.
Note - Qlik is case sensitive, so name needs to be exactly same.
After that this , join will work.

Master:
LOAD
Part,
Status,
Deadline,
Clerk,
Target,
quantity,
Desired,
date,
StatusID,
WorkOrderType
Resident Table2;

LEFT JOIN(Master)

LOAD
RMNr,
Prozess as Part,
Position,
CostItemGroupID,
Target time,
CostItemGroup,
Date,
Time
Resident Table1;

DROP Tables Table1, Table2;