Removed duplicate strings in a column
Posted: Tue Jun 10, 2014 5:58 am
Hi All,
Am trying to concatenate a error description column, based on key column.
Say my data is like this.
ID, Number, Error Code
100, MD350, Invalid Amount
101, MD310, Invalid Account
102, MD350, Invalid Code
103, MD400, Invalid Transaction
104, MD350, Invalid Code
I wanted combine the error code for all the transaction which has same number. Eg:
My output would look like:
100, MD350, Invalid Amount, Invalid Code, Invalid Code
I am able to achieve this using Sort, Key change and comparing previous and current values. The problem now i face is to remove duplicates there.
Say if i want to remove the 'Invalid Code' which is repeating twice there. Is there a way we can look for a string which is repeating in a column and remove it?
Thanks.
Am trying to concatenate a error description column, based on key column.
Say my data is like this.
ID, Number, Error Code
100, MD350, Invalid Amount
101, MD310, Invalid Account
102, MD350, Invalid Code
103, MD400, Invalid Transaction
104, MD350, Invalid Code
I wanted combine the error code for all the transaction which has same number. Eg:
My output would look like:
100, MD350, Invalid Amount, Invalid Code, Invalid Code
I am able to achieve this using Sort, Key change and comparing previous and current values. The problem now i face is to remove duplicates there.
Say if i want to remove the 'Invalid Code' which is repeating twice there. Is there a way we can look for a string which is repeating in a column and remove it?
Thanks.