Re: postgres function

From: Ramesh T <rameshparnanditech(at)gmail(dot)com>
To: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: postgres function
Date: 2015-10-15 12:32:51
Message-ID: CAK8Zd=vQi56xc240WN+tHOnGj7gEkZSfw=-mKncDg7zJDZcOyg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

select position('-' in '123-987-123')
position
---
4
But I want second occurrence,
position
-------------
8

plz any help..?

On Thu, Oct 15, 2015 at 12:54 AM, David G. Johnston <
david(dot)g(dot)johnston(at)gmail(dot)com> wrote:

> On Wed, Oct 14, 2015 at 9:38 AM, Ramesh T <rameshparnanditech(at)gmail(dot)com>
> wrote:
>
>> Hi All,
>> Do we have function like regexp_substr in postgres..?
>>
>> in oracle this function seach the - from 1 to 2 and return result,
>> regexp_substr(PART_CATG_DESC,'[^-]+', 1, 2)
>>
>
> ​Maybe one of the functions on this page will get you what you need.
>
> http://www.postgresql.org/docs/devel/static/functions-string.html
>
> David J.
>
> ​
>
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David G. Johnston 2015-10-15 13:02:11 Re: postgres function
Previous Message Dario Beraldi 2015-10-15 10:21:58 Installing plpython3u