Oracle Transactional Business Intelligence

Welcome to the Oracle Analytics Community: Please complete your User Profile and upload your Profile Picture

TRIM Trailing Not Working

Received Response
14
Views
1
Comments

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.

Tagged:

Answers

  • Rank 8 - Analytics Strategist

    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:

    1. Identify the total length of the string.
    2. Identify the Position where '{' is occurring.
    3. 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!

Welcome!

It looks like you're new here. Sign in or register to get started.