Support Questions

Find answers, ask questions, and share your expertise

how to remove duplicates in a cell Hive SQL

New Contributor

I got a column in my Hive SQL table where values are seperated by comma (,) for each cell. Some values in this string are duplicated which I want to remove. Here is an example of my data:

data:

---------------

test, test1, test,test1

---------------

 rest,rest1,rest1,rest    

---------------

chest,nest,lest,gest    

---------------

The result should replace any duplicates:

---------------

 test,test1      

---------------

rest,rest1       

---------------

chest,nest,lest,gest    

---------------

 

I want to remove duplicates. Could anyone help me with this issue?

 

Thank you

1 REPLY 1

Rising Star