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(TRANSPARENTDA TA,';')-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
I have less experince in postgre, I have one question regarding how to convert or replicate the following senerio into postgre.
substr(INSTR(TRANSPARENTDA
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
http://www.postgresql.org/docs/current/static/functions-string.htmlI think you want to use strpos function
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
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks :D