Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
i have a questions.
I have a table with reverse duplicates, see this example data:
ID # FOREIGN ID
1 # 2
1 # 5
1 # 9
9 # 1
5 # 1
2 # 1
I just need the corrrelation, the direction doesnt matter.
Meaning i need to get rid of the first 3 or the last 3 lines.
Can anybody help me with that? I dont manage to get that done 😕
Cheers.
Hi,
try this:
Input:
LOAD F1&'_'&F2 as Key,* INLINE [
F1, F2
1, 2
1, 5
1, 9
9, 1
5, 1
2, 1
];
NoConcatenate
Result:
load * ,
F2&'_'&F1 as key1
resident Input
Where not Exists(key1,Key);
dROP Table Input;
Drop field key1,Key;
outuput:
Hi,
try this:
Input:
LOAD F1&'_'&F2 as Key,* INLINE [
F1, F2
1, 2
1, 5
1, 9
9, 1
5, 1
2, 1
];
NoConcatenate
Result:
load * ,
F2&'_'&F1 as key1
resident Input
Where not Exists(key1,Key);
dROP Table Input;
Drop field key1,Key;
outuput:
Thanks a lot, that works for me!