Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Return Substring without specifying the length of string

892256Oct 13 2011 — edited Oct 18 2011
Hi,

I have a string like '(months_between (:start date,'01-JAN-2000')/12)'.

I want to return the substring ':start date'.To get this i can write the query as:

SELECT SUBSTR('months_between (:start date,''01-JAN-2000'')/12',(instr('months_between (:start date,''01-JAN-2000'')/12',':start date')),11)
FROM dual

But i want that string to be returned without specifying the length or end of string as ','.

Any help would be appriciated.
Thanks.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 15 2011
Added on Oct 13 2011
19 comments
670 views