Oracle Transactional Business Intelligence

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

manager name split

Received Response
22
Views
3
Comments

Hi I am writing an analysis where I need first and last name of manager sepertaly from Oracle HCM BI. I got the first name using Left. How do I take the last name. If I take the last name it comes with the middle name

Answers

  • Raghavan p-Oracle
    Raghavan p-Oracle Rank 5 - Community Champion

    Hi,

    Which Subject Area(SA) are you using?

    Do you mean to say, that no separate columns are available in that SA?

    Regards,

    Raghavan

  • Nathan CCC
    Nathan CCC Rank 7 - Analytics Coach

    Hi Parvathi,

    Which subject area are you using? Are you using (Full) "Name" not "Display Name"?

    Assume this is not your query because this subject area has the fields you need?

    select all "Person Names (Global)"."Full Name" s
    , "Person Names (Global)"."Last Name" , "Person Names (Global)"."First Name" , "Person Names (Global)"."Middle Names" , "Person Names (Global)"."Display Name" , "Person Names (Global)"."List Name" from "Workforce Management - Person Real Time"
    order by 1 asc nulls last
    fetch first 7 rows only

    Are you looking at the manager of a person worker assignment or event?

    select all 0 s_0
    , "Manager"."Name" s_1
    , "Manager"."Person Identifier"
    , "Manager"."Person Number"
    from "Workforce Management - Worker Assignment Real Time"
    order by 1 asc nulls last, 2 asc nulls last, 3 asc nulls last
    fetch first 7 rows only

    So an option is to join to the person subject area using the manager person id if you want the extra fields.

    Unfortunately the concept of first middle last name implemented by Oracle is not a very good fit in our modern multi-cultural global world. Many systems use instead Family Name and Other Names. So it may not be a great idea to split up the name in the first place. But if you have a good business case to do so then…

    Be careful using function left and right. The format of a full name is something that is configured in the system by your application implementation consultant by legislation country. So it may be that in UK you have setup full name as "First Name, Last Name" but in the US you have setup "Last Name, First Name" etc. So make sure you check your configuration before making any assumptions that a single format is true for all rows.

  • Parvathi Arun
    Parvathi Arun Rank 1 - Community Starter

    Thank you so much for the reply. I was able to separate first and last name using substring, left and right functions. SUBSTRING((TRIM(BOTH ' ' FROM (SUBSTRING("Manager"."Name" FROM (POSITION(' ' IN "Manager"."Name")) FOR 100)))) FROM (LOCATE(' ', (TRIM(BOTH ' ' FROM (SUBSTRING("Manager"."Name" FROM (POSITION(' ' IN "Manager"."Name")) FOR 100)))))) FOR 100)