How to compare two set of attribute values?
Hi All!
I have a dataset that has 7 columns. one column is like "no" and the other 6 columns are sets of two.
set-1: three columns are "attr1_1",attr1_2","attr1_3" .
set-2: other three columns are "attr2_1",attr2_2","attr2_3".
so I just want to compare these two sets of columns, if we any one column in the first set matching with second set I need to highlight a flag value as "1".
sample Input & Output:
Input:
no attr1_1 attr1_2 attr1_3 attr2_1 attr2_2 attr2_3
234 "klo","12","78" "jkl","13","78" "jkl","14","89" "klo","12","78" "hj","31","4" "kl","9","0"
456 "klo","12","78" "klo","12","78" "ko","12","78" "jkl","13","78" "jkl","13","78" "hj","31","4"
output:
no attr1_1 attr1_2 attr1_3 attr2_1 attr2_2 attr2_3 flag
234 "klo","12","78" "jkl","13","78" "jkl","14","89" "klo","12","78" "hj","31","4" "kl","9","0" 1
456 "klo","12","78" "klo","12","78" "ko","12","78" "jkl","13","78" "jkl","13","78" "hj","31","4" 0
In the first row--"234", att1_1("klo","12","78") is macthed with attr2_1("klo","12","78") -------------output flag value becomes "1"
and second row--"456", none of (attr1)set-1 columns macthed with set-2 columns(attr2)-----------flag is "0"
Could anyone help me in solving this?
Thanks in Advance!