On 15/10/15 14:32, Ramesh T wrote:
>  select position('-' in '123-987-123')
> position
> ---
> 4
> But I want second occurrence,
> position
> -------------
> 8
> 
> plz any help..?


For instance:

# select char_length(substring('123-987-123' from '^[^-]*-[^-]*-'));
char_length
-------------
8

Best,
Torsten


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Reply via email to