Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Dear Programmers
I have to table like bellow
I want join FastHelper field with typeId but in fastHelper data entered like this(red oval) and seprate with "|" but in typeId the numbers are seprate each others.
So i will appreciate if anyone knows how can i join these two tables?
You could split your field fastHelper before with: subfield(fastHelper, '|') which caused a loop within the load for each delimited number and afterwards you could join your tables.
- Marcus
You could split your field fastHelper before with: subfield(fastHelper, '|') which caused a loop within the load for each delimited number and afterwards you could join your tables.
- Marcus
Consider using a mapping table and Applymap rather than a join. Don't join - use Applymap instead
This will also need the use of Subfield as Marcus_Sommer suggests.
small example
dt:
Mapping LOAD * inline [
1, x
6750, aaa
6737, bbb
6000, ccc
6721, ddd
6747, eee
6731, fff
6730, ggg
];
fh:
load Id, FastHelper, ApplyMap('dt', NewFastHelper) as NewFastHelper;
load Id, FastHelper, SubField(FastHelper, '|') as NewFastHelper;
load * inline [
Id, FastHelper
1, 6750|6737|6000
2, 6721
3, 6747
4, 6731|6730
];
Thanks a lot. it worked