Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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;
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.....🙂
Hi Jérôme,
No need to recreate a script, it will automatically generate the column.
Thanks,
Tanish
Hi Jerome,
Could provide a sample example explaining your issue.
From your statement , Concatenate would have resolved the issue.
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;
Hi,
attached the file
Thanks for advance.
regards
Jérôme
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.....🙂
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
Hi Jérôme,
No need to recreate a script, it will automatically generate the column.
Thanks,
Tanish