Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Hoping for steer on below requirement:
Check all values in the 6 digit SSN field. If any 5 of the 6 digits match then concatenate using any delimiter else do not concatenate.
In below example,
5 SSN digits match for ID's 1,2. Also all SSN 6 digits match for IDs 2,4 (order not relevant).
Hence, rows need to be concatenated for both fields.
Data | |
SSN | ID |
012345 | 1 |
321654 | 2 |
144543 | 3 |
123456 | 4 |
Expected Output | |
SSN | ID |
012345|321654|123456 | 1|2|4 |
144543 | 3 |
Any help would be welcome. Thanks in adv
144543 have all six digits matching with 012345
Can you check this?
tab1:
LOAD SSN, ID, Concat(Tuple,'',Col) As Pat
Group By SSN, ID
;
LOAD *, If(Index(SSN,IterNo()-1)>0,IterNo()-1,'X') As Tuple, IterNo()-1 As Col
While IterNo()<=10
;
LOAD SSN-0 As SSN, ID INLINE [
SSN, ID
012345, 1
321654, 2
144543, 3
123456, 4
];