Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Jérôme5625
Creator
Creator

Issue to merge the tables in function of a single fied

Hello,

I'm looking for a function that doesn't meet my needs. I've tried concatenate, join ...

but I can't achieve what I want.
I'm joining tables 1 and 2 and 3 for which I want table 4 (merging the three tables into one by the fiedl "Id" only).

Can you help me? Thank you in advance.

Have a nice day

Jérôme

Labels (5)
3 Solutions

Accepted Solutions
MayilVahanan

Hi

Try like below

Temp:
LOAD * INLINE [
Id, def, rep
5000000, a, aa
5000001, b, bb
5000002, c, cc
5000003, d, dd
1000000001, , yy
];

join
LOAD Id, def as def1 INLINE [
Id, def
1000000000, broken
1000000000, cracks
1000000000, assembling
1000000001, manque
1900000002, aspect
1900000003, rayure
1900000003, finish
];

Final:

Load Id, If(Len(Trim(def))=0, def1, def) as def, rep Resident Temp;

join
LOAD * INLINE [
Id, Equip
1000000000, 102520
1000000001, 98520
1900000002, 120000
1900000003, 199999
5000000, 100
5000001, 110
5000002, 120
5000003, 130
];

DROP Table Temp;

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.

View solution in original post

Tanish
Partner - Creator
Partner - Creator

Hi Jérôme,

You can Keep your Table 3 first, as i can see all the records are available there. Then you can keep your 2nd table and then your First table 

Rather than using Left join, Right join, inner join. Can write only Join in between the tables (only writing join works like Outer Join).

Table3

Load .... From ...;

Join

Table2

Load .....From ...;

 

Hope this will help.....🙂

View solution in original post

Tanish
Partner - Creator
Partner - Creator

Hi Jérôme,

No need to recreate a script, it will automatically generate the column.

Thanks,

Tanish 

 

View solution in original post

6 Replies
Lakshmanan
Partner - Contributor III
Partner - Contributor III

Hi Jerome, 
Could provide a sample example explaining your issue. 

From your statement , Concatenate would have resolved the issue. 

MayilVahanan

Hi

Try like below

Temp:
LOAD * INLINE [
Id, def, rep
5000000, a, aa
5000001, b, bb
5000002, c, cc
5000003, d, dd
1000000001, , yy
];

join
LOAD Id, def as def1 INLINE [
Id, def
1000000000, broken
1000000000, cracks
1000000000, assembling
1000000001, manque
1900000002, aspect
1900000003, rayure
1900000003, finish
];

Final:

Load Id, If(Len(Trim(def))=0, def1, def) as def, rep Resident Temp;

join
LOAD * INLINE [
Id, Equip
1000000000, 102520
1000000001, 98520
1900000002, 120000
1900000003, 199999
5000000, 100
5000001, 110
5000002, 120
5000003, 130
];

DROP Table Temp;

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Jérôme5625
Creator
Creator
Author

Hi, 

attached the file

Thanks for advance.

regards

 

Jérôme

Tanish
Partner - Creator
Partner - Creator

Hi Jérôme,

You can Keep your Table 3 first, as i can see all the records are available there. Then you can keep your 2nd table and then your First table 

Rather than using Left join, Right join, inner join. Can write only Join in between the tables (only writing join works like Outer Join).

Table3

Load .... From ...;

Join

Table2

Load .....From ...;

 

Hope this will help.....🙂

Jérôme5625
Creator
Creator
Author

thanks you for your help

I was wondering if I could add a new "detail" field to my table 1, for example. Do you think I should rewrite the script or will it be generated automatically in my table 4?

 

regards

Tanish
Partner - Creator
Partner - Creator

Hi Jérôme,

No need to recreate a script, it will automatically generate the column.

Thanks,

Tanish