How to retrive firstname,middlename and lastname in a table

Hi all,
Please can u help me anyone.
example:
EMP table
Ename column
ramesh sachin tendulkar
vara prasad
bala
how to display firstname,middlename,lastname in a emp table using oracle 9i.
firstname middlename lastname
ramesh sachin tendulkar
vara prasad
bala
Thank in advance

Something like this perhaps?
SQL> ed
Wrote file afiedt.buf
  1  with e as (select 'ramesh sachin tendulkar' as ename from dual union all
  2             select 'vara prasad' from dual union all
  3             select 'bala' from dual)
  4  --
  5  -- END OF TEST DATA
  6  --
  7  select substr(ename,1,decode(instr(ename,' '),0,length(ename),instr(ename,' '))) as firstname
  8        ,substr(ename,instr(ename,' ')+1,length(ename)-instr(ename,' ')-(length(ename)-instr(ename,' ',-1))) as middlename
  9        ,substr(ename,decode(instr(ename,' ',-1),0,length(ename)+1,instr(ename,' ',-1)+1)) as surname
10* from e
SQL> /
FIRSTNAME               MIDDLENAME              SURNAME
ramesh                  sachin                  tendulkar
vara                                            prasad
bala
SQL>If you upgraded to 10g or 11g it would be easier as you could use regular expressions.

Similar Messages

  • Update  FirstName,MiddleName and LastName  of Contact Employee of BP via DI

    Hi,
    Iam using SAP BOne 8.8 SP:00  PL15   and i need to add a BP using DI and i also need to add Conatct Person information for that BP. But the FirstName,MiddleName and LastName Fields of the contact person is not exposed through the DI.
    Is there any way to add or update those fields through ( FirstName,MiddleName and LastName ) DI
    Thanks & Regards
    Rejish

    If it's not exposed to the DI, you can not do it with the DI or DTW so it will have to be done through the application

  • How to read ecel sheet and insert into oracle table

    hi all,
    am working on forms builder 6i. and i want , from a trigger to read from a a sheet excel file the data and insert into a table that i had aleady created.
    i whrite a code that can till now open the excel file but i cant read the data to insert it into the table.
    am using TEXT_IO.IS_OPEN to open the file
    TEXT_IO.GET_LINE to take each line
    and subst(x as variable) to read the first line , but the subsrt return nohing
    any solution??

    There's already a topic made on this: how to copy data from excel to oracle forms

  • How to Break this String and put into a Table

    Hi all,
    Currently i working on the Reading of Csv file.THe Csv file wil be stored as BLOB in one table.
    The Format of the Csv file is
    EMPCODE :DATEOFBIRTH
    312089 ,12/01/1984
    321456 ,03/05/1980
    120212 ,04/08/1987
    312456 ,23/12/1977
    311110 ,12/04/1998
    323232 ,20/06/1990
    UPLOAD_BLOB
    column     Datatype
    UploadId Number
    File_details BLOB
    And i reading the BLOB in one procedure and i m getting the String as like this ---->
    "312089 ,12/01/1984
    321456 ,03/05/1980
    120212 ,04/08/1987
    312456 ,23/12/1977
    311110 ,12/04/1998
    323232 ,20/06/1990"
    I am Dont know how to Parse this String and put in table
    While 1<STRING.LENGTH
    LOOP
    EMPCODE=SUBSTRING();
    DATEOFBIRTH=SUBSTRING();
    INSERT INTO TABLE VALID_EMPCODE(EMPCODE,DATEOFBIRTH)VALUES(......);END LOOP
    VALID_EMPCODE
    EMPCODE VARCHAR2(30)
    DATEOFBIRTH VARCHAR2(15)
    Can any one tell me how to parse this whole string and break them

    Duplicate post
    How to Break this String and put into a Table

  • How it use Filter Id and FilterPanelFocusid in JSF Table component

    How it use FilterId and FilterPanelFocusid in JSF Table component

    How it use FilterId and FilterPanelFocusid in JSF Table component

  • How to export full dump and metadata of particular table

    let us consider mytest schema is having 6 tables
    tname tabtype
    myt table
    myaxpertlog table
    abb table
    ccc table
    ddd table
    xxx table
    now from this schema i want full dump and also from myaxpertlog table i required metadata only not records.
    c:> export mytest/log file=20130409mytest0904pm.dmp tables=(myaxpertlog) rows=n
    if i tried i am get only one table but it does have records.
    Not like this.

    Hello,
    I follow a smart way to do this:
    1-Create a parfile then put the conditions in.
    2-put in this parfile the conditions
    directory=DPUMP_DIR
    dumpfile=dumpfilename.dmp
    logfile=logfilename.log
    schemas=yourschema
    query=Yourschema.myaxpertlog:"where 1=2"In this example you will get all the tables you want with data inside the schema name you provided.
    The table myaxpertlog will come with metadata only because the condition 1=2 will never occur.
    Please note that this condition will apply only if you want to export those tables from the same schema.Kind Regards
    Mohamed ElAzab
    http://mohamedelazab.blogspot.com/

  • Help! How to retrive the date and time from MySQL 'datetime' type

    In my MySQL database, I have stored a data type 'DATETIME' as 20070412093012 which is interpreted as 2007-04-12 09:30:12, How to using Java method to retrive it from data base???
    like resultSet.getDate('datetime')????or what is the method?

    Have a look at the API documentation for ResultSet. Which of the methods documented there do you think might be what you need? If you can't tell which is the right one, then post your candidates here and ask a question about them.

  • Parse a String with FIRSTNAME MI and LASTNAME but not always a MI

    Anyone,
    can I write a single clause to parse a column that cotains first name, middle initial and Last name but the Middle initial is sometimes there and sometimes not?
    Like this:
    Steven F Abbott
    Mikel Allums (Steve)
    Pedro A Arroyo
    Daniel R. Hasbrook
    Steve G Ball
    Ernie C Bloecher
    Richard Carrillo
    James M Chamberlain
    I need data seperated.
    I have:
    SUBSTR(NAME, 1, (INSTR(NAME,' ',1,1)-1)) "FIRST_NAME",
    SUBSTR(NAME,(INSTR(NAME,' ',1,1)+1), LENGTH(NAME)) "LAST_NAME",
    But that middle initial presents problems and I see it as first letter in last name but if I chnage the search for space to second occurance I get the whole name:
    SUBSTR(NAME,(INSTR(NAME,' ',1,2)+1), LENGTH(NAME)) "LAST_NAME",
    Any help would be greatly appreciated.
    Thanks,
    Miller

    may this eaxmple is little better if there is only one name then will display as first anem only
    SQL> WITH T AS
      2       (
      3          SELECT 'john smith' col1  FROM DUAL
      4          UNION ALL
      5          SELECT 'Derick R Alias' FROM DUAL
      6          UNION ALL
      7          SELECT 'Michel M john'  FROM DUAL
      8          UNION ALL
      9          SELECT 'Kiren'  FROM DUAL)
    10  SELECT (CASE
    11             WHEN INSTR (col1, ' ') = 0
    12                THEN col1
    13             ELSE SUBSTR (col1, 1, INSTR (col1, ' ') - 1)
    14          END
    15         ) first_name,
    16         CASE
    17            WHEN INSTR (col1, ' ', 1, 2) > 0
    18               THEN SUBSTR (col1, INSTR (col1, ' '), 2)
    19            ELSE NULL
    20         END middle_name,
    21         (CASE
    22             WHEN INSTR (col1, ' ', 1, 2) > 0
    23                THEN SUBSTR (col1, INSTR (col1, ' ', 1, 2) + 1)
    24             WHEN INSTR (col1, ' ') = 0
    25                THEN NULL
    26             ELSE SUBSTR (col1, INSTR (col1, ' ') + 1)
    27          END
    28         ) last_name
    29    FROM T;
    FIRST_NAME     MI LAST_NAME
    john              smith
    Derick          R Alias
    Michel          M john
    Kiren

  • How to get list data and bind to data table or Grid view in share point 2010 using j query

    hi,
    How to bind list data in to data table or  grid view  using Sp Services.
    How to use sp services in share point 2010 lists and document library 

    Hi, You can use List service, SPServices and JQuery to get your requiement done-
    See here for an sample implementation -
    http://sympmarc.com/2013/02/26/spservices-stories-10-jqgrid-implementation-using-spservices-in-sharepoint/
    http://www.codeproject.com/Articles/343934/jqGrid-Implementation-using-SpServices-in-SharePoi
    Mark (creator of SPServices) has some good documentation on how to use SPServices-
    http://spservices.codeplex.com/wikipage?title=%24().SPServices
    SPServices Stories #7 – Example Uses of SPServices, JavaScript and SharePoint
    http://sympmarc.com/2013/02/15/spservices-stories-7-example-uses-of-spservices-javascript-and-sharepoint/
    Hope this helps!
    Ram - SharePoint Architect
    Blog - SharePointDeveloper.in
    Please vote or mark your question answered, if my reply helps you

  • How to retrive more than one row value from table

    hi,
      I had create one table if i entered value in more than one row, the second row override the first row value and while printing it in flat file i am getting the second value entered twice.
      i created one context for each column.
        plz provide me a solution..........
           very urgent..........
            Regards,
            Kiruthika

    Hi,
    Create seperate element for each row and then set values.
    for(int i=0;i<4;i++)
    IPrivate<view name>.I<node name>Element element = wdContext.node<node name>().create<node name>Element();
    wdContext.node<node name>().addElement(element);
    element.set<Att>();
    to retrive:
    int s=wdContext.node<node name>.size();
    for(int j=0;j<s;J++){
    wdcontext.node<nodename>.getnodeelementAt(j).getAttribute();
    Check this link about tables
    https://www.sdn.sap.com/irj/sdn/downloaditem?rid=/library/uuid/bad3e990-0201-0010-3985-fa0936d901b4
    Regards,
    Vijayakhanna Raman

  • How create a record type and a pl/sql table of that record type in database

    Hi
    I want to create a record type and then I want to create a PL/SQL table in the oracle 9i database.
    I have done it in PL/SQL block.
    But when I am trying to do it in database it is throwing me some error.
    Could you please tell me how can I do that?
    Regards

    user576726 wrote:
    Hi
    I want to create a record type and then I want to create a PL/SQL table in the oracle 9i database.
    I have done it in PL/SQL block.
    But when I am trying to do it in database it is throwing me some error.
    Could you please tell me how can I do that?
    RegardsRECORD type is supported only in PL/SQL for SQL you need to use OBJECT type.

  • How to compare SSIS Variable and Column In the table!!.

    Hi Folks,
    My Requirement IS :
    1<sup>st</sup>run: if the record does not exist
    in the table insert the record (file_name, last_modified_file_date) and create a copy in the archive folder with file_name_currentdate.csv
     Daily run:
    retrieve the last_modified_file_date from the input file and check if the retrieved date is greater than the last_modified_file_date in the table:
    If true:
    create a copy of the input file in the archive folder and update the last_modified_file_date in the table with the retrieved date
    If false don’t do nothing because the file has been archived in one of the previous runs.
    I have already retrieving the modified date and File Nae iserting into Filename Table: (That table has 2 columns which are FileName and FileDate) so In script task everytime the variable getting Modified date(retrieve the last_modified_file_date
    from the input file) could yu please give me idea after that how I can Compre the existing table record and variable. I have already
    imported the all Filenames and Modified into table like below.
    Could you please give your ideas friends.

    Try this:
           1) Execute SQL Task (In the Parameter mapping, pass filename and fileLastModified date retrieved from the file - your SSIS Variable)
           2) In the ‘SQL statement’, Write a TSQL like this:
    --declare these variables before the use
    SET @filename=?
    SET @fileLastModifieddate=?
    --declare @MaxLastTblDate and @flag=0
    select @MaxLastTblDate = Max(last_modified_file_date) from Table T1
    If (@fileLastModifieddate>@MaxLastTblDate)
    --Do your insert here
    --Update the variable with @flag (say 1)
    3) Set the value of @flag in the Result set of Execute SQL (another SSIS variable)
    4) In the next control flow component, do the file archiving.
    5) Between these two components, check the value of the @flag variable in the precedence constraints (whether to copy the file for archiving or not)
    Hope this helps.

  • How to find the Conditions and Condition values in table entries

    Dear Experts -
    the issue is about getting the table entries of Pricing procedure Condition type and condition values - Application Component - MS external service management.
    In case of service order Condition document number (EKKO - KNUMV) is not updated.
    KNUMV we can use for Pricing procedure - Application componant - M Purchasing.
    How to get table entries of pricing procedure - Application Componant - MS External services management.
    Thanks in Advance

    Hi
    SES releated table:
    ESKL - Account assignment specification for service line
    ESKN - Account assignment in service package
    ESLH - Service package header data
    ESLL - Lines in service package
    ESSR - Service entry sheet header data
    ESUC - External services management: Unplanned limits for contract item
    ESUH - External services management: unplanned service limits header data
    ESUP - External services management: unplanned limits for service packages
    ESUS - External services management: Unplanned limits for service types
    Regards
    Prasanna R

  • How to synchronize between OID and the Custom Database  Tables ?

    Hi All,
    Our ADF Application is using Oracle SIngle-Sign On (OAS 10.1.4). Meanwhile we also maintain
    users login within Database table to store application menu accessibility data.
    i.e:
    Firstly user Login using Oracle SSO, after logged in, application will query the above mentioned
    database tables to determine which menu he/she has access.
    We have develope a security module to input users login into the database, so I need to synchronize
    the data into OID, so that that particular user can use Oracle SSO.
    How is the mechanism to do that ?
    Thank you very much,
    xtanto

    Hi,
    OID providesa Java and PLSQL API. I agree with Chris that from what you describe, the PLSQL API seems to be the best approach to take as it allows you to use database triggers for the synchronization
    Frank

  • How can one page forward and backwards through a table?

    I want to use mutli-pages in my web order search .But I don't know how to do?
    Please help me!

    If you are using CS4, there is a Command to create a Web Album... this does it automatically for you.
    Otherwise, you can create this manually.  Say you have 3 pages,
    page1.html  (is the index page of the album)
    page2.html
    page3.html
    Therefore, using ordinary text links
    Home would link to page1.html
    Previous would link to page3.html
    Next would link to page2.html
    You would need to make adjustments naturally to each page as you move along with the gallery pages, changing the previous and the next links as needed.  Below is a a basic example of setting up the links in a simple table structure.  You would also then style the table layout as you see fit - yes, using css preferably  :-)
    <table>
    <tr>
    <td><h2>MY GALLERY OF PHOTOS</h2>
    <a href="page3.html">Previous</a> | <a href="index.html">Home</a> | <a href="page2.html">Next</a>
    </td>
    </tr>
    <tr>
    <td>
    <br>
    <a href="../images/img_2401_jpg.jpg"><img src="../images/img_2401_jpg.jpg" border=0></a><br>
    </td>
    </tr>
    </table>
    Here's an article on creating an album using the DW Command I mentioned earlier. You could create the album and then copy and paste the code into a current page if you've already designed on.,... not too difficult, I just tested it.  You do however, need to have Fireworks to process the images.
    http://livedocs.adobe.com/en_US/Dreamweaver/9.0/help.html?content=WSc78c5058ca073340dcda91 10b1f693f21-7ad1.html
    You could also check out the Lightbox effect which is very popular:
    http://www.lokeshdhakar.com/projects/lightbox2/
    Or do a google search for 'jquery'.  There are different album effects using that framework as well.
    Hope some of this helps  :-)
    Nadia
    Adobe® Community Expert : Dreamweaver
    Unique CSS Templates |Tutorials |SEO Articles
    http://www.DreamweaverResources.com
    Book: Ultimate CSS Reference
    http://www.sitepoint.com/launch/005dfd4/3/133
    http://twitter.com/nadiap

Maybe you are looking for

  • SOAP: error in response

    Hi everybody, we are requesting a SOAP. In RWM --> message monitorg we got the error error in response in SXMB we see the error:   <?xml version="1.0" encoding="UTF-8" standalone="yes" ?> - <!--  Mapping der Response-Message   --> - <SAP:Error xmlns:

  • Help...cant find my music

    I love(d) my ipod and everything was going really well until my little girl got a new computer for Christmas. Tonight she has tried to download somthing from her new machine on to my ipod and now I can only access the new stuff she has downloaded (an

  • A challenging problem

    Hi Experts, I have a package.procedure in which the procedure is as follows:- CREATE OR REPLACE PACKAGE BODY xx_my_pkg as PROCEDURE items_exist(P_Source_Organization varchar2 ,P_Dest_Organization  varchar2 ,P_assembly_item varchar2)    AS       l_ite

  • Session Binding Question

    Hello All, I might be missing something, but I am trying to bind a session when a user logs in and out of my web application in order to be able to actively track online usage, however I can't seem to get it to work. I would appreciate any help that

  • Icloud 3.0 missing outlook add-in?

    I recently upgraded to iCloud Control Panel 3.0 (on 18Sep). I am running a new Dell laptop with Windows 7 Professional and MS Outlook 2013. I am also using a iPhone 5 on Verizon's network. Every since the iCloud upgrade, my calendar and contacts do n