Get Name and Lastname letter

Hi
How I do to get the Fist name and the Fist letter of the last name from Full name Field and viceversa?
Full name                     Name
John Smith                    John S
Charles Daimond               Charles D
TransAtlantic Services ABC    TransAtlantic S
Full name                     Name
John Smith                    J Smith
Charles Daimond               C Daimon
TransAtlantic Services ABC    T ServicesRegards,
Levi. P
Edited by: 893409 on 27/05/2013 12:55 PM

Similar to Frank's without the regexp.
SQL> with names as (
  2     select 'John Smith' full_name from dual union all
  3     select 'Charles Daimond' from dual union all
  4     select 'TransAtlantic Services ABC' from dual union all
  5     select 'Sachin Ramesh Tendulkar' from dual union all
  6     select 'John T. Smith' from dual union all
  7     select 'Joseph Ralph Anthony Smith' from dual)
  8  select full_name, substr(full_name, 1,instr(full_name, ' '))||
  9         substr(substr(full_name, instr(full_name, ' ', -1)+1), 1, 1) first_last,
10         substr(full_name, instr(full_name, ' ', -1)+1)||' '||
11         substr(full_name, 1, 1) last_first
12  from names;
John Smith                 John S                      Smith J
Charles Daimond            Charles D                   Daimond C
TransAtlantic Services ABC TransAtlantic A             ABC T
Sachin Ramesh Tendulkar    Sachin T                    Tendulkar S
John T. Smith              John S                      Smith J
Joseph Ralph Anthony Smith Joseph S                    Smith JYou are still on your own with Madonna as Greg pointed out.
John

Similar Messages

  • Parse comma separated value and map with other table to get Name and change it back to comma separate.

    Hi,
    I have one existing view(with around 15 fields), in which I have to add few more fields from table called PI.
    Now these fields have values like (55C4444F-D83B-4F96-A011-367A3755BA6C , F52388E2-485B-49DF-8534-FDF46D23F59E , 722432E1-F063-4CBD-B83D-1B97836E82953) 3 values comma separated.(Sometimes only one value and sometimes 4 or 5 or 7-8 depend on user has entered
    on web page)
    Also I have another table called PHA and this tables has 2 fields Values and Name so I have to map this two tables based on VALUES fields and get Name from this PHA table and show in view and that also Comma separated.
    So basically I have to Parse the PI table's Values field 1st, map it with PHA table to get Name and then Make it comma separated in that existing view.
    To make fields comma separate I used below query,
    (SELECT DISTINCT SUBSTRING
                SELECT ','+ PI.[Name]  AS [text()]
                FROM [DB].[dbo].[Table] PHA1
    Inner Join  [DB].[dbo].[Table] PI
    ON PHA.[Value] = PI.[VALUE]
                WHERE PHA1.PId =PHA2.PId and PHA1.CId = PHA2.CId
                ORDER BY PHA1.PId
                For XML PATH ('')
            ), 2, 1000) 
    FROM [DB].[dbo].[Table] PHA2
    Inner Join [cSharpSite_profiles].[dbo].[PetAllergies] PA
    Inner Join  [DB].[dbo].[Table] PI
    ON PHA.[Value] = PI.[VALUE]
    ) [Name]
    Vicky

    Wait, this sounds wrong. You have a view where you group values into a comma-separated list. While that surely will make some purists cringe, I can see that it makes sense from a presentation perspective.
    But if you want to use these concatenated values as atomic values again, you should go back to the base tables and them from there. Building views on views may sometimes be a good idea, but if you are too keen on reuse you can cause a performance disaster.
    So do it right from the beginning.
    Erland Sommarskog, SQL Server MVP, [email protected]

  • Get name and type of data in an object?

    Hello,
    I would like to know if there is a way of getting the names and types of data encapsulated by a labview object?
    For example, lets say I make a simple object, called myObject to be unoriginal, with private data: myObjectName (string), myObjectValue (int 32) (etc)
    How then do I construct a method to return the type of the myObjectValue data, or infact return the names and types of all of the data fields within the object, which could be many?
    Thanks,
    Paul.
    Solved!
    Go to Solution.

    Hi there
    i can't find a generic solution. Attached is a workaround. The trick is to pack all private data inside a cluster and use the "Controls" property of a template of this cluster to get all data elements and their types.
    Best regards
    chris
    CL(A)Dly bending G-Force with LabVIEW
    famous last words: "oh my god, it is full of stars!"
    Attachments:
    LVClass_8.5.1.zip ‏38 KB

  • How to get name and information in paypass credit card

    i already can take information about name, card no , expirer date, card type for all the credit card...
    only left the paypass i cannot take the info
    can anyone help me??
    i only face in the problem that dunno wat the APDU to use in paypass
    cause all the card i use "00 B2 01 0C 00" this code also can retrive the data
    only paypass it show "69 85"
    have any other APDU that i can use??

    sorry lexdabear, cause i use a program to run not yet create the code. and the program is giving me to put the APDU and will auto get response and return the status to me.. so
    for master card i use 00 A4 04 00 07 A0 00 00 00 04 10 10 and get response i will get the status is 90 00
    then use 00 B2 01 0C 00 i will get the information about the card
    but paypass cannot. i will get error...
    so i change to ur code also the same

  • Show user´s name and lastname using XML Form Builder

    Hello
    I created a XML project with XML Form Builder and i have to show user´s name an lastname in RenderListItem form.Can anybody help me,please? Thanks

    Hi Unai,
    check out the description by Patricio in this thread:
    https://forums.sdn.sap.com/click.jspa?searchID=78716&messageID=1616027
    Hope this helps,
    Robert

  • How to get name and Mac ID off MB Air?

    Selling a MB Air, so I need to get my name, registration, Mac ID etc. off it. Any easy way to do that?
    Will adding a new account with admin privileges and then deleting my original account do the trick?
    Thanks.

    Are you sure you have no personnal information in any data files on the system? No credit card numbers anywhere? Passwords to web sites? etc .... If I was selling a system, I would do a secure erase of the hard drive by writing zero's to it (use Disk Utility to do that), restore software to it's original state, then sell the system. If you want to be really good to the buyer, you can scan these discussions to see how to reset the system, so it starts up as if it were a brand new system, allowing the new owner to register with Apple.

  • When I start my iMac it gets stuck and the letter. M just keeps typing away

    When I start my iMac the keyboard isn't working and it just keeps ping an m
    X

    Good that you can get to it through TB.  Use that connection to delete some files you no longer need so you will have room to boot the system and/or resintall the system.
    You can also try booting in Safe Mode.  That sometimes willl clear up enough disk space so it willl boot and then you can delete some files from there.
    http://support.apple.com/kb/HT1564?viewlocale=en_US
    If that won't work there are other remedies that take more work.  Post back.

  • Get name (and properties) of running job in program

    Hi all,
    we have some weird behaviour in our system. We know the methodcreating havoc but we don not know which background job may be the trigger.
    In the method, we want to determine the active job (if any) that triggers this.
    We integrated reporting of SY-SYSID , SY-MANDT and CALL FUNCTION 'SYSTEM_CALLSTACK' to get the full call stack. Additionally we want the details about a job if it is run in background (SY-BATCH).
    Any idea?
    Kind regards,
    Clemens

    Try this FM BP_FIND_JOBS_WITH_PROGRAM.
    Regards,
    Joy.

  • Payee Name of Travel Expenses Bank Defaulting to IT2 Name and Lastname?

    Changing employee name in IT2 (P0002-NACHN or P0002-VORNA) will automatically change ng Payee Name (P0009-EMFTX) in IT9 for travel banks (IT9 subtype 02).
    Does anybody know where or in what program can I find the code for this particular action?

    Hello Karen,
    If you type the name into infotype, this will override the infotype 0002 data.
    Regards,
    Manny

  • How to get name of sbRIO programatically

    How to get "name" and "Comment" of sbRIO which I write to sbRIO-9602 in MAX in Identification box (Model, Serial number, MAC address, Name)?
    Solved!
    Go to Solution.

    That shows:
     - IP settings
          - IP adress:        136...etc.
          - DNS name:      MyMaster5                   - THAT IS WHAT I NEED, just in wrong place - in MAX it is not in IP settings, that's why i didn't searched for it there.
          - subnet mask    255.255.255.0
          - gateway          136...
          - DNS server      136...
     - MAC address        00800...
     - serial number        16....
     - system state        Running
     - model name         sbRIO-9602
     - model code          7373
     - password protected restarts?    T/F
     - halt if TCP/IP fails?                   T/F
     - locked?                                   T/F
     - use DHCP?                             T/F
    Still there is no "comment" as in MAX. But that's not so important now.
    I have LW Development system 2009 SP1 Profesional, Realtime Development 2009 SP1
    Thanks very much!

  • I am having trouble editing track names and information in my Itunes library.  Help center says click on selected track, click on file, click on get info, make changes, and press save.  When I get to get info, it won't let me change anything. Help??

    How do I edit track names and information in my I-tunes library?  I followed the Help Center instructions, but it will not let me change anything.  Can someone tell me what I'm doing wrong?

    Those symptoms usually indicate a permissions problem. See Repair security permissions for iTunes for Windows for advice.
    tt2

  • Get complete name and surname with the username id

    Hi guys!!
    How can I get the complete name and surname of an user SAP?
    (transactions, tables, ....)
    Thanks a lot.
    Best regards
    Ana

    Hello,
    The best way to get this data is through the BAPI:
    DATA: l_s_address TYPE bapiaddr3,
          it_return   TYPE STANDARD TABLE OF bapiret2.
    * Getting the First & Last name of the user
    CALL FUNCTION 'BAPI_USER_GET_DETAIL'
      EXPORTING
        username = is_vpheader-fi_usnam
      IMPORTING
        address  = l_s_address
      TABLES
        return   = it_return.
    * No need to check SY-SUBRC as the FM will never raise an Exception.
    CONCATENATE l_s_address-firstname
                l_s_address-lastname
          INTO  v_name_person
          SEPARATED BY space.
    Anyways just to let you know, these details can be obtained from ADRP.
    BR,
    Suhas

  • When I use migration assistant it won't let me use my account name that I'm signed in with.  It requires me to select a different user name and then creates a separate account where my files live.  Why can't I select the user name and account name I have?

    I'm trying to migrate my music and pictures over to my new iMac.  When I use the migration assistant it connects to my PC fine but it won't let me use the account name and username that I have created as the admin.  It requires me to create a new user account - so then I have two separate accounts to log in to which i don't want.  How do I get it to let me use the current account that I have to move my files to?
    Thanks!

    Migration Assistant creates a new account and migrates all the information you have requested to that new account. There is no way around that. However once migrated you can move the data to the account you want to. Here are some instructions for doing so:
    Transferring files from one User Account to another.

  • HT5624 Why in my email ( the one on my ipod5 that I use with my apple ID) when I get emails about my use of my apple ID to use a service in the from field it has my fathers name and when I click on it it shows his contact info ????

    Why in my email ( the one on my ipod5 that I use with my apple ID) when I get emails about my use of my apple ID to use a service in the from field it has my fathers name and when I click on it it shows his contact info ???? I also set up my apple ID with a new email account and also I signed up for iCloud but used the same apple I'd email and password but it gave me a I cloud email! I did activate the favorites in my email . Noticed the from field has my fathers name and contact and it is a notification about me using my apple ID to sign in to FaceTime! Something is messed up, not sure how or why???

    i didn't read a lot of your 2nd paragraph, but it seems like the password is the issue, right?
    do a true clean install
    reboot your machine and hold down command+option+r, you should see a spinning globe - if you don't see the globe or anything that reads internet recovery, shut down and try again
    at menu, chose disk utility and once there, find your HD on the left side, select the physical name and erase it as mac journaled
    exit disk utlity
    at menu, choose install OSX
    this time, when it asks for a password just hit continue, it will let you complete without a password
    you should be able to get into your laptop, now figure out what password you'll be able to use with your kb issue

  • I have an iphone 3g I tried to dl an app for netflix and it said i need to have ISO 5 but my phone has ISO 4.2.1 and when i try to update it I get message saying I have current version how or what can i do do to get an app the lets me watch netflix on my

    I have an iphone 3g I tried to down load  an app for netflix and it said I  need to have ISO 5 but my phone has ISO 4.2.1 and when I  try to update it on my computer through itunes  I get message saying I have current version how or what can I do do to get an app the lets me watch netflix on my  iphone 3g .Is there an sulision to my problem? I also tried another app with another name diff from netflix and I got the same message saying i need ISO 5 .Someone please help  thank you

    Thank you for your help are you aware of any apps that will work the iso 4.2.1 system that will let you watch movies on the phone. Also I tried to down load something else the other day and got message that Safari wont let you open this is ther any to see if i have the latest safari on my phone?

Maybe you are looking for

  • Open document from Personnel file in ESS

    Hi Guys, When opening the personnel file in ESS the record with all nodes and documents are shown. When I try to open a document the document itself is not opened and the message "Error while reading component info" is shown. When I show the record i

  • Lost notes from iPhone 3GS

    I have lost all of my 'notes' from my iphone.  I updated to the latest OS and noticed that all of my passwords etc stored as 'notes' had gone.  I have tried to find a back up with no luck and have also restored from an earlier back up with no luck. 

  • Condition formula variable on date key figure

    Hello, I would be grateful for any help on this I want to have a condition that has a user input formula variable But the Key Figure on which I want to base the condition is a Date And when you create the formula variable it allows only the following

  • Auto calculation

    Hi, I have an issue regarding autocalculation.In report,Entity and Account dimensions are in row .Actual,budget,Variance and Variance% are the columns for that report.For entity, we have used base funtion.And auto calculation is on for entity.Now the

  • I'll settle for a simple Yes or No...

    Is it possible (re-)edit text in item of HTML Editor minimal type? Hi, I created a form with an item of type HTML editor minimal. After insertig tekst and saving the text to the database (varchar2(4000)-type column) and displaying it in an APEX-repor