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.


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


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
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Guy Hengel [angelIII / a3]Billing EngineerCommented:

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.
awking00Information Technology SpecialistCommented:
It's hard to tell by your example what it is you're trying to accomplish since
the Oracle syntax is incorrect. The substr syntax should be in the form of
substr(<somestring>, start_position, length). The start position can be expressed
using an instr function, and the length can be expressed as the difference of
two instr functions. Postgre makes this type of string parsing much easier using
the split_part function -

select split_part(TRANSPARENTDATA,';',5) from yourtable

which will return the substring '87' (the 5th element in the string separated
into substring elements by the semi-colon).

Open in new window

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
omerniahAuthor Commented:
Thanks :D
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.