Oracle Analytics Cloud and Server

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

How to remove the last three characters from a string?

Received Response
263
Views
3
Comments
fabryddorf-Oracle
fabryddorf-Oracle Rank 4 - Community Specialist

Hi Guys,

On the column country in my report i am getting the country like Italy/RF.

I need to remove the '/RF'. Tried TRIM, combination of SUBSTRING and LENGTH, but not getting it right.

any idea?

Answers

  • Jerry Casey
    Jerry Casey Rank 6 - Analytics Lead

    Is it always "/RF"? If it always starts with a slash, you can say LEFT("Table"."Country", LOCATE('/',"Table"."Country")-1)

  • fabryddorf-Oracle
    fabryddorf-Oracle Rank 4 - Community Specialist

    Great!! That worked!

    how to i mark as solution provided?

  • Jerry Casey
    Jerry Casey Rank 6 - Analytics Lead

    I don't know how it works on this new site, which I have found to be very frustrating. I think you just marked your own answer as correct, though.