From: | Ramesh T <rameshparnanditech(at)gmail(dot)com> |
---|---|
To: | "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: instr detail |
Date: | 2015-07-30 14:53:42 |
Message-ID: | CAK8Zd=uaZ_6tiwyQu2GBKnd3vhFFwahf4ZmoedFppzy9Ku8nWg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
here is the example tks help..
http://stackoverflow.com/questions/2965655/how-to-find-the-first-and-last-occurrences-of-a-specific-character-inside-a-stri
On Thu, Jul 30, 2015 at 7:38 PM, Ramesh T <rameshparnanditech(at)gmail(dot)com>
wrote:
> select position('.' in '.T.homas')
> result
> --------
> 1
> it returns first postion.but I need last occurence of ' . ' .
> actual result
> ------
> 3
> any help..?appreciated.
>
>
> On Thu, Jul 30, 2015 at 5:00 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
>> Melvin Davidson <melvin6925(at)gmail(dot)com> writes:
>> > Based om the definition of Oracle instr(), the equivalent PostgreSQL
>> > function would be
>> > position(substring in string).
>>
>> See http://www.postgresql.org/docs/9.4/static/plpgsql-porting.html
>> particularly the "appendix" at the bottom. I'm not sure that code
>> is still the best way to do it (it's very old), but it's there.
>>
>> regards, tom lane
>>
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Adrian Klaver | 2015-07-30 14:58:32 | Re: user connection not recorded? |
Previous Message | Tom Lane | 2015-07-30 14:46:14 | Re: user connection not recorded? |