Skip to Main Content

Analytics Software

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!

OBIEE extract string from between 2 characters

Joe Choueiri-OracleFeb 22 2020 — edited Feb 23 2020

Need your help please.

I need to extract string from between 2 characters in obiee

For example if I have a text in a column that says "Original Order *IN 194186* / Product Purchased: Unlimited Learning Subscription (12 months) / Quantity: 22 / Agreement used: EDU-IN-12145971-31-MAY-2015 / Subscription set to expire on 13-AUG-16"

and I want to extract only the letters and numbers that are between the 2 asterisk (*) and these characters and number could be in the middle of the string or in the beginning or at the end.

I got to this point where this

TRIM(BOTH '*' FROM SUBSTRING( "Opportunity Attributes"."Miscellaneous Text" from Locate('*',"Opportunity Attributes"."Miscellaneous Text")+1  for LOCATE('*', "Opportunity Attributes"."Miscellaneous Text",-1)-1))

Is producing this:

IN 194186* / Product Purc

Thanks

Joe

This post has been answered by Gianni Ceresa on Feb 23 2020
Jump to Answer
Comments