Link to home
Start Free TrialLog in
Avatar of omerniah
omerniah

asked on

How to replicate this in instr() function in postgree

Hi all,

I have less experince in postgre, I have one question regarding how to convert or replicate the following senerio into postgre.

substr(INSTR(TRANSPARENTDATA,';')-3,3)

the senrio is the following I have a field in a database which the data is as follow:

00;45;00;23;87;454;09;90;

so in this case if I want to grab the 87 from the above data how to follow it in postgre sql as I have search there is no function INSTR on postgre can you guys help me out how to do it ?

thanks in advance
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

Avatar of Ora_Techie
Ora_Techie

Checkout:

35.11.3. Appendix
    This section contains the code for a set of Oracle-compatible     instr functions that you can use to simplify     your porting efforts.    

http://www.postgresql.org/docs/8.0/interactive/plpgsql-porting.html#PLPGSQL-PORTING-APPENDIX
ASKER CERTIFIED SOLUTION
Avatar of awking00
awking00
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of omerniah

ASKER

Thanks :D