Re: String reverse funtion?

From: ginkgo36 <ginkgo56(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: String reverse funtion?
Date: 2013-10-10 01:53:22
Message-ID: 1381370002527-5773950.post@n5.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Thanks alot everyone,
Actually, I just start learning about Programming language. So, each your
solution is a good suggestion for me to learning. Thanks so much.
Please help me one User-defined Functions to solves this when my data like
this:
EA;BX;CA
CA;EA
BX;EA
And when run UDFs, output is:
CA;BX;EA
EA;CA
EA;BX

One again, thanks so much

Pavel Stehule wrote
>> Based upon the example, it's probably very easy to use a split/explode in
>> your language of choice (VB.NET, perl, python, etc).
>
>
> or SQL
>
> select string_agg(u, ';' order by r desc)
> from (select row_number() over () r, u
> from unnest(string_to_array('EA;BX;CA',';')) u) x;
> string_agg
> ────────────
> CA;BX;EA
> (1 row)
>
> Regards
>
> Pavel
>
>
>>
>>
>> --
>> Sent via pgsql-general mailing list (

> pgsql-general@

> )
>> To make changes to your subscription:
>> http://www.postgresql.org/**mailpref/pgsql-general&lt;http://www.postgresql.org/mailpref/pgsql-general&gt;
>>

--
View this message in context: http://postgresql.1045698.n5.nabble.com/String-reverse-funtion-tp5773871p5773950.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message John R Pierce 2013-10-10 02:04:09 Re: [HACKERS] Urgent Help Required
Previous Message David Johnston 2013-10-10 01:23:44 Re: ERROR: invalid value "????" for "YYYY"