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