Re: [GENERAL] instr detail

2015-07-30 Thread Ramesh T
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 t...@sss.pgh.pa.us wrote:

 Melvin Davidson melvin6...@gmail.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



Re: [GENERAL] instr detail

2015-07-30 Thread Ramesh T
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 rameshparnandit...@gmail.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 t...@sss.pgh.pa.us wrote:

 Melvin Davidson melvin6...@gmail.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





[GENERAL] instr detail

2015-07-29 Thread Ramesh T
Hi All,
   is instr available in postgres 9.3..?

in oracle instr('12.32.42','.',-1) ,any help appreciated


Re: [GENERAL] instr detail

2015-07-29 Thread Karsten Hilbert
On Wed, Jul 29, 2015 at 10:03:56PM +0530, Ramesh T wrote:

 Hi All,
is instr available in postgres 9.3..?
 
 in oracle instr('12.32.42','.',-1) ,

 any ...

http://www.postgresql.org/docs/9.3/static/index.html

 ... help appreciated

You are welcome !

Karsten
-- 
GPG key ID E4071346 @ eu.pool.sks-keyservers.net
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346


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


Re: [GENERAL] instr detail

2015-07-29 Thread Melvin Davidson
Based om the definition of Oracle instr(), the equivalent PostgreSQL
function would be
position(substring in string).

On Wed, Jul 29, 2015 at 3:11 PM, Igor Neyman iney...@perceptron.com wrote:





 *From:* pgsql-general-ow...@postgresql.org [mailto:
 pgsql-general-ow...@postgresql.org] *On Behalf Of *Ramesh T
 *Sent:* Wednesday, July 29, 2015 12:34 PM
 *To:* pgsql-general@postgresql.org
 *Subject:* [GENERAL] instr detail



 Hi All,

is instr available in postgres 9.3..?



 in oracle instr('12.32.42','.',-1) ,any help appreciated



 __



 There are lots of string functions and operators:



 http://www.postgresql.org/docs/9.3/static/functions-string.html



 There is definitely a replacement for Oracle’s instr(…).



 Regards,

 Igor Neyman






-- 
*Melvin Davidson*
I reserve the right to fantasize.  Whether or not you
wish to share my fantasy is entirely up to you.


Re: [GENERAL] instr detail

2015-07-29 Thread Igor Neyman


From: pgsql-general-ow...@postgresql.org 
[mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Ramesh T
Sent: Wednesday, July 29, 2015 12:34 PM
To: pgsql-general@postgresql.org
Subject: [GENERAL] instr detail

Hi All,
   is instr available in postgres 9.3..?

in oracle instr('12.32.42','.',-1) ,any help appreciated

__

There are lots of string functions and operators:

http://www.postgresql.org/docs/9.3/static/functions-string.html

There is definitely a replacement for Oracle’s instr(…).

Regards,
Igor Neyman



Re: [GENERAL] instr detail

2015-07-29 Thread Devrim GÜNDÜZ

Hi,

On Wed, 2015-07-29 at 22:03 +0530, Ramesh T wrote:
 
is instr available in postgres 9.3..?
 
 in oracle instr('12.32.42','.',-1) ,any help appreciated

Orafce extension includes instr function:

https://github.com/orafce/orafce

Regards,
-- 
Devrim GÜNDÜZ
Principal Systems Engineer @ EnterpriseDB: http://www.enterprisedb.com
PostgreSQL Danışmanı/Consultant, Red Hat Certified Engineer
Twitter: @DevrimGunduz , @DevrimGunduzTR




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


Re: [GENERAL] instr detail

2015-07-29 Thread Tom Lane
Melvin Davidson melvin6...@gmail.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


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