Re: Sorting CSV string and removing Duplicates

Поиск
Список
Период
Сортировка
От Yves Dorfsman
Тема Re: Sorting CSV string and removing Duplicates
Дата
Msg-id 55B68DCF.3030603@zioup.com
обсуждение исходный текст
Ответ на Sorting CSV string and removing Duplicates  (Alex Magnum <magnum11200@gmail.com>)
Список pgsql-general
>
> I have a csv string in a text field that is unsorted and contains duplicates.
> Is there a simple way to remove these and sort the string.
>
> E.g
> 2,18,20,23,1,27,1,2,8,16,17,18,20,22,23,27
>

Do you need to eventually load the data in Postgres?

I'd personally use python to deal with this, we're talking 4 or 5 lines here,
if even. I suspect you can do the same with perl or ruby or whatever is your
weapon of choice.

How columns does your csv file has? Is it a one-line file?

--
http://yves.zioup.com
gpg: 4096R/32B0F416



В списке pgsql-general по дате отправления:

Предыдущее
От: dinesh kumar
Дата:
Сообщение: Re: Sorting CSV string and removing Duplicates
Следующее
От: Chris Mair
Дата:
Сообщение: Re: Sorting CSV string and removing Duplicates