Categories
- All Categories
- 15 Oracle Analytics Sharing Center
- 14 Oracle Analytics Lounge
- 208 Oracle Analytics News
- 41 Oracle Analytics Videos
- 15.7K Oracle Analytics Forums
- 6.1K Oracle Analytics Idea Labs
- Oracle Analytics User Groups
- 76 Oracle Analytics Trainings
- 14 Oracle Analytics Data Visualizations Challenge
- Find Partners
- For Partners
How do you find a string within another string (complex)

OBIEE 11g.
We have a name field that consists of first and middle initial (if one exists), followed by the last name.
each initial, if it exists, is followed by a period, hyphen, underscore, slash, or space.
Here are some of the possible entries:
J.D.Doe
J.Doe
Doe
J_D_Doe
J.D_Doe
J_D.Doe
J Doe
J/Doe
As you can see, the only real constant here, is the last name occupies the n rightmost columns of the field.
I'm trying to extract the last name, but just dont know how to write the SQL to do it.
This needs to be done in the "Edit Formula" area in an analysis.
Is it even possible to do this inside an analysis?
Answers
-
Use these with nested isnull functions for scenarios
SUBSTRING('J.D.Doe' FROM LOCATE('.','J.D.Doe',-1)+1)
SUBSTRING('J_D_Doe' FROM LOCATE('_','J_D_Doe',-1)+1)
0 -
Doing data cleansing in the front end of OBIEE is to seriously miss the mark ... it's an inefficient approach.
0