> > 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 -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general