Categories
TRIM Trailing Not Working

Hello:
I have a column that I want to remove all characters after { and it isn't removing any characters. It is not erroring out, but shows the entire column.
Here is my formula:
TRIM(TRAILING '{' FROM "Opportunity"."Opportunity Name")
What am I doing wrong?
Thanks for any insight.
Answers
-
Hi @Tonya H,
Welcome to the Oracle Analytics Community.
Please find below the definition of TrimTrailing function and a working example, it might help to understand the working methodology.
TrimTrailing function Strips specified trailing characters from a character string.
Example:
Used the following to Trim Trailing 6.
TRIM(TRAILING '6' FROM "Worker"."Employee Mailing Address Line1")
If you want to remove any character after '{' then Trim Trailing is not the correct function to use.
Here's a high level steps that needed to be done:
- Identify the total length of the string.
- Identify the Position where '{' is occurring.
- Take the characters till to the number returned by Step2 from the total length return by Step1 from the beginning using SubString function.
Hope this help.
Thank You!
0