Crack the full name column

Hi all

I have to split a column that contains the full name of the person first, middle and last.

I did:

Select alt_accomm_registrations.full_name, substr (full_name, 1, instr (full_name, ' ')) "Firstname."
substr (full_name, instr (full_name, ' ')) 'Name' alt_accomm_registrations.


The problem is somepeople have only put there firstname and some took a first and last, and some have put first, middle and last. Then sometimes, if somebody gave only a first name, it shows in the field of the Suranem?

Published by: oraCraft on 08-Oct-2010 04:41

Something like...

SQL> ed
Wrote file afiedt.buf

  1  with t as (select 'Victoria Seymour-Blaauw' as fullname from dual union all
  2             select 'Jennifer Onyewuenyi' from dual union all
  3             select 'Paul William Pitto' from dual union all
  4             select 'Hugh Leddy' from dual union all
  5             select 'Dermot McBrien' from dual union all
  6             select 'Katherine' from dual union all
  7             select 'Fred James Tim Smith' from dual)
  8  --
  9  select regexp_replace(fullname, '^([^ ]+).*$', '\1') as firstname
 10        ,regexp_replace(regexp_replace(fullname,'^[^ ]+ ?'), ' ?[^ ]+$') as middle_names
 11        ,trim(regexp_substr(regexp_replace(fullname,'^[^ ]+ ?'), '(^| )[^ ]+$')) as surname
 12* from t
SQL> /

FIRSTNAME            MIDDLE_NAMES                   SURNAME
-------------------- ------------------------------ --------------------
Victoria                                            Seymour-Blaauw
Jennifer                                            Onyewuenyi
Paul                 William                        Pitto
Hugh                                                Leddy
Dermot                                              McBrien
Katherine
Fred                 James Tim                      Smith

7 rows selected.

SQL>

Tags: Database

Similar Questions

  • How can I get the toolbar to show just the icons, not the full name of the site

    in the toolbar, I want just the icons of my favorites to show, not the full name, so I can add more toolbar...

    Hello
    It seems that this problem should have a simple solution. All what you need to do is...

    1. Right-click a bookmark
    2. Click change
    3. Change the name of the site "" (simply press the space bar)
    4. Repeat steps.

    This will display the name as a SPACEBAR, eliminating the name entirely.

    Please contact the support!

  • I bought a 6 iPhone as good as new, but inside in Maps application, it has a PIN in other countries, with the full name, phone, address, linked to another address in the city of mi. My suspect is if this is a new feature of relly is a recertificated or mi

    I bought a 6 new iPhone with iOS 9.3.1 system realized by me. But in the app Maps, I found stranger´s information of another person, pinned as well in my country (Uruguay) and the Argentina, including the full name, address and access a address in Montevideo to another in Buenos Aires.

    I Don t know the name or personal information provided here, and I never put there. So, I need to know if I bought a new device or a recertificated and otherwise, maybe stollen.

    Think it is very difficult to understand something, and I want some directions before asking this question to my provider here.

    Obviously, it's not a new phone. Take it to where you bought it. Get your money; Don't let them pass you to another 'new' phone.

  • Read file without knowing the full name

    Dear all,

    I want to read data from a file, but without knowing the full name of the file.

    For example I have data files in a program that the first letters of the data files are the date and the rest of the numbers, I can't predict IE 20081027_5323621.

    Is it possible to read this file in the knowledge that the characters that correspond to the date?

    Thank you!

    OK, that worked well.

    Thank you very much!!!

  • How to get the full name of the user of the OPS?

    Hi Experts,

    I know we can get the login controller pageContext.getUserName () user name. Is there a simple way/API to get the full name of the user (name, first name) of the OPS?

    Thank you.

    Hello

    USER name and information of the PERSON are two different concepts. You can get the id of user with pageContext.getUserId () connection. In order to get the first name, last name, you must select it from table PER_ALL_PEOPLE_F.

    You can use the sql select and set pUserId of pageContext.getUserId ();

    SELECT FIRST_NAME, LAST_NAME TO PAP PER_ALL_PEOPLE_F, FND_USER FU

    WHEN TRUNC (SYSDATE) BETWEEN PAP. EFFECTIVE_START_DATE AND PAP. EFFECTIVE_END_DATE

    AND FU. EMPLOYEE_ID = PAP. PERSON_ID

    AND FU. User_id =: pUserId

    Anil

  • Hi, is it possible in 2014 CC Illustrator to increase the size of Panel of police find so I can see the full name of the police? Thank you

    Hi, is it possible in 2014 CC Illustrator to increase the size of Panel of police find so I can see the full name of the police?

    You can see on the screenshot below fonts with longer names are not displayed, I know you can see an excerpt from the police, but that slows down and me its not practical!

    Concerning

    Screen Shot 2016-02-11 at 10.16.56.png

    Hi emiltsonev,

    We do not have an option to increase the size of this Panel. You can use the slider on the right to scroll.

    Thank you

    OM

  • How to get the full name (device disk) using esxtop?

    Hello

    I am looking for storage settings using esxtop - pressing 'u' for drive.

    As I use the iSCSI (open file server) device, I couldn't see the identifier of the full device. Can someone help me to get this.

    I have attached the screenshot of esxtop for this...

    Device name.jpg

    Any idea? Thanks in advance.

    In ESXTOP enter a capital 'L' and type a number to make the larger DEVICE field. Depending on the length of the name of the device - you might need to up to 40 characters to present the full name.

    Entering the '?' in ESXTOP will give you the options you can set (this information is also there as well).

  • Impossible to update the full name with post-process Manager field

    Hello

    I have a manager post-process that updates some fields when a user is changed. The post-process Manager update correctly the e-mail, and common name fields. However, for some unknown reason, I am unable to update the display name. There is no error message, but the value is not updated.

    Here is the code I use to update the display name:

    EntityManager entityManager = Platform.getService (EntityManager.class);

    HashMap < String, Object > uploading = new HashMap < String, Object > ();

    attrs.put (UserManagerConstants.AttributeName.DisplayName.GetId (), 'New value');

    entityManager.modifyEntity (orchestration.getTarget () .getType (), userEntityId, uploading);

    There also seems to be something different with the full name field. When I print all the fields and values for a particular user, I get something like:

    First name = John

    Family name = Doe

    Email = [email protected]

    [...]

    However, the display name has the following format:

    Display name = {base = John Doe}

    I also tried to set a new value in the format "{base = new value}", but it does not work either.

    Am I missing something?

    Thank you

    -jtellier

    Display name must be placed in a Hashtable as follows:

    Map dispNameMap = new HashMap();
    dispNameMap.put ("base", lastName + "" + firstName); then pass this card as:

    Parameters.put ("Display Name", dispNameMap);

  • How to change the content of the 'account name' column in the' overview of accounts. "

    Hello

    I use Oracle Identity Manager 11 GR 2!

    In the Self-Service under "My access", I see a list of all the service accounts. If for example I create a account, then there's a strage number displayed in the "Account name" column  See my photo...

    See the image: IOM user

    My question is, how can I change the contents of this column? I never put this number!

    Thank you!

    BR

    To change the name of the account to the account user id, you can follow the instructions below:

    1. open the form of the process of the resource that you want to display the user id as the name of account, instead of this strange number for example. UD_IPNT_USR

    2. create a new version of the form.

    3. go in the Properties tab.

    4. Select the user ID property and click on add property button.

    5. Select the account name and the value is false.

    6. save the form and make the version active.

    7 connect to IOM self-service console, select a user with iplanet account for her. You can see the user id of the account in the account instead of the strange number name,

    HTH

  • sort the month name column based on id in RPD itself only months

    sort the month name column based on id months in RPD itself only without creating the logical column.

    Set your id for months as the column sort order of the name of the month.

    Double click on the month name-> in general tab set the column sort order as the id of the month

  • How to get the full name of the user to a sso.

    Hi all

    I am brand new with oracle application server.
    I use oracleAS 10g with SSO enabled. How can I get the full names of the users?
    I know that this information can be obtained with the command 'ldapseach' but I'm looking for information in a view or a package.
    Is it possible to get this information in a view or a package?

    Thank you.

    Look at the portal.wwse_api function person_info package
    Maybe it's something similar that you are looking for

  • How can I customize the Thunderbird message columns to show the raw sender address (not the full name) and e-mail address "received for" which was used to reach me?

    I find more and more important to be able to see the actual email address of the sender rather than just displaying the name, because they do not usually show a company name - a domain would always be. Is it possible to customize the settings/write a file of script/tweak to add columns of name email & domain raw? When dealing with a number of people from the same company, it is difficult to order or nod thanks to a list of emails to find. I know also that 2 people with the same name to different companies and it is impossible to distinguish.

    Secondly, as an addition of associated column, since a number of e-mail aliases join it would be useful to have a column to display the "received for" part of the source of the message that reveals the real enamel used in the To/CC/BCC, which led to me. Once again can it be twisted or scripted?

    I have programming experience but did not Add ons, and would be open to a proposal which is to create a custom module if adding columns with custom values is possible like this.

    Best regards

    Drew

    This module help you?

    https://addons.Mozilla.org/en-us/Thunderbird/addon/show-address-only/

  • How can I remove the full name of the computer in my house windows basic.why that my system shows me on the field?

    I have a laptop computer HP with windows vista. My system shows that it is on the field.

    As I didn't join field that I don't know why he's on the field. I won't be on the field.

    so I want to remove the full computer name. How can I do so.

    Hello

    ·         When you connect to the internet from?

    ·         How do you know if your computer is on the field?

    ·         Is this a brand new computer?

    I suggest you follow the steps mentioned below:

    Method 1:

    Try it, you can select a network connection and remove it from the network and sharing Center. This should allow to forget any field that you could connect the computer.

    Method 2:

    If it is a brand-new computer nine try to reformat to get all the information system back to factory settings.

    Note: save all the important documents first.

  • Download a pdf file, save, won't show the full name of the backup file when name contains a space, stop the name of the file.

    Download a pdf file, the file name contains a space in the middle of the file. The name showing on the 'Save' popup is first letters up to space. Works fine on IE8. For example, a file named "old snail_12345.pdf" would show only 'old' (ignore the "s"). This is on Firefox 30.0, WinXP Pro.

    Apparently, there is an extension to work around this problem. I have not tried myself. See:

    http://KB.mozillazine.org/Filenames_with_spaces_are_truncated_upon_download

  • Difficulties to display the full name of the contact in my list of people in Outlook

    The list of people in Outlook does not appear correctly and I can see the partial names of onlly, I see half superior of the name with the botom half of the name not displayed. Also this morning when I open Outlook and checked my "list of people" no names were present, they all had disappeard but about 1/2 hour later, they were suddenly back.

    Have you tried to access your account using a different browser or computer?

    The same problem occur?


    The first step in troubleshooting is to clear browser cache/cookies.
    For the Internet Explorer browser: press CTRL + SHIFT + DELETE, and then click on remove
    For Google Chrome: Simultaneously press CTRL + SHIFT + DELETE, and then click clear browsing data
    For Firefox: Press CTRL + SHIFT + DELETE, and then click clean now
    (other browsers are similar)

    For a great experience, you need to update your browser to the latest version and make sure that the latest version of Microsoft Silverlightinstalled   and running for browsers that support it.

    Outlook.com is optimized for the following browsers: Windows Internet Explorer 8, 9 and 10; Google Chrome 17 and higher; Firefox 10 and higher; and 5.1 on Mac Safari.
    Outlook.com is good on the following browsers, but some features may not display properly: Internet Explorer 7, Google Chrome 5, Firefox 9 and 5 and Safari 5.1 on Windows or Safari on Windows and Mac 5 and 16.
    Outlook.com is not supported on the following browsers: Internet Explorer 6 and higher, Google Chrome 4 and higher, Firefox 4 and higher, Safari 4.x and more...

Maybe you are looking for