Insert single quote into the table

Hi
I have to insert values into a column that are retrieved by a select query on another table.
The values inserted have single quotes (').
Does anybody know how to do it?
Thanks in advance

If you get from one table and then insert in the other there shouldn't be any problem at all.
SQL> create table blah_one as
  2  select 'Radha''s Sarma' col from dual
  3  /
Table created.
SQL> select * from blah_one
  2  /
COL
Radha's Sarma
SQL> create table blah_two as
  2* select col from blah_one
SQL> /
Table created.
SQL> select * from blah_two
  2  /
COL
Radha's Sarma
SQL>Cheers
Sarma.

Similar Messages

  • Insert Multiple rows into the table from that table data

    Hi All,
    I have a requirement like to insert mulitple rows into the table from that table data only(I need to replicate the data).
    In this table primary key is composite primary key with all foreign keys.primary key also including the Date foreign key.I need to change that date at the of insertion.
    INSERT
    INTO myschema.Fact_page_performance
    time_sk ,
    batch_id ,
    delta_msec ,
    delta_user_msec,
    error_code_sk ,
    content_errs ,
    element_count ,
    page_bytes ,
    Available ,
    date_sk
    VALUES
    (SELECT time_sk ,
    batch_id ,
    delta_msec ,
    delta_user_msec,
    error_code_sk ,
    content_errs ,
    element_count ,
    page_bytes ,
    Available
    FROM myschema.FACT_PAGE_PERFORMANCE_BACKUP
    WHERE date_sk=20090509,20090510
    But it is giving the error like missing Expression.
    Could anyone please help to me.
    Thanks and Regards
    Swetha.

    You can have either VALUES or SELECT not both
    INSERT
    INTO myschema.Fact_page_performance
    time_sk ,
    batch_id ,
    delta_msec ,
    delta_user_msec,
    error_code_sk ,
    content_errs ,
    element_count ,
    page_bytes ,
    Available ,
    date_sk
    SELECT time_sk ,
    batch_id ,
    delta_msec ,
    delta_user_msec,
    error_code_sk ,
    content_errs ,
    element_count ,
    page_bytes ,
    Available
    FROM myschema.FACT_PAGE_PERFORMANCE_BACKUP
    WHERE date_sk=20090509,20090510;

  • Insert value with quotes into the table

    Hi,
    How can I insert a value along with quotes into a table column of type varchar.
    Meaning..I want to insert the value 'TEST' including the single quotes.
    Regards,
    Murali Mohan

    It only a matter of using the correct number of quotes. to insert 'TEST' you use 3 quotes on each end
    example: '''TEST'''
    Hi,
    How can I insert a value along with quotes into a table column of type varchar.
    Meaning..I want to insert the value 'TEST' including the single quotes.
    Regards,
    Murali Mohan

  • I can't insert my data into the table - help please

    Hello everyone,
    I have a trouble about JSP. I'm using Java2 SDK,JSP 1.2,Mysql and TOMCAT.
    I want to do this. A user has to enter the nicno,into the html form(EnterNicInter.jsp),to verify if it is already exist or not. If it is exist in the db, an error msg(Record already exist) must be displayed. If not, then the page "InterviewForm.jsp" displayed. This part is working.
    But, I can't save these details into the db by clicking submit button int the InterviewForm.jsp.
    I wrote a javaBean for this task. Here is it.
    CandidateMgr.java
    package hrm;
    import java.io.*;
    import java.sql.*;
    public class CandidateMgr
         private String nicno;
            private String title;
            private String firstName;
         private String civilStatus;
            private String tele;
            private String eduQua;
         // Constructor
         public CandidateMgr()
              this.nicno = nicno;
              this.title = title;
              this.firstName = firstName;
              this.civilStatus= civilStatus;
              this.tele = tele;
              this.eduQua = eduQua;
              //getters & setters.
               // Initializes the connection and statements
            public void initConnection() {
                    if (connection == null) {
                 try {
                          String sql;
                          // Open the database
                          Class.forName(DRIVER).newInstance();
                          connection = DriverManager.getConnection(URL);
                          //Verify nicno
                          sql="SELECT * FROM Candidate where nicNo= ?";          
                   pstmt1 = connection.prepareStatement(sql);
                   sql ="INSERT INTO Candidate                               
                   VALUES(?,?,?,?,?,?)";
                   pstmt2 = connection.prepareStatement(sql);
             catch (Exception ex) {
                System.err.println(ex.getMessage());
         public boolean verifyNicNo(){
              boolean nic_no_select_ok = false;
              String nic="xxxx";
              initConnection();
                    try {
                       pstmt1.setString(1, nicno);
                   ResultSet rs1 = pstmt1.executeQuery();               
                                if(rs1.next()){
                        nic=rs1.getString("nicNo");
                               if(nic=="xxxx")
                        nic_no_select_ok = true;
                   } else{
                        nic_no_select_ok = false;     
                   rs1.close();
                           pstmt1.close();
                    catch (Exception ex) {
                      System.err.println(ex.getMessage());
              return nic_no_select_ok;
         public boolean addInter(){
              boolean add_inter_ok = false;
              try{
                      //assign values for the object
                   pstmt2.setString(1, nicno);   //      ERROR(java:652)
                   pstmt2.setString(2, title);
                   pstmt2.setString(3, firstName);
                   pstmt2.setString(4, civilStatus);
                   pstmt2.setString(5, tele);     
                   pstmt2.setString(6, eduQua);
                   if(pstmt2.executeUpdate()==1) add_inter_ok=true;
                   pstmt2.close();  
                  catch(SQLException e2){
                           System.err.println(e2.getMessage());
              return add_inter_ok;
    IntreviewForm.jsp (used to submit data into the db)
    <form method="POST" action="InterviewCtrl.jsp">
         //codes
    <input type="text" name="nicno" size="14" style="border:1px solid #0000FF;           
    color: #FF0000; font-weight: bold">
    <input type="text" name="title" size="14" style="border:1px solid #0000FF;           
    color: #FF0000; font-weight: bold">
    <input type="text" name="firstName" size="14" style="border:1px solid #0000FF;           
    color: #FF0000; font-weight: bold">
    <input type="text" name="civilStatus" size="14" style="border:1px solid #0000FF;           
    color: #FF0000; font-weight: bold">
    <input type="text" name="tele" size="14" style="border:1px solid #0000FF;           
    color: #FF0000; font-weight: bold">
    <input type="text" name="eduQua" size="14" style="border:1px solid #0000FF;           
    color: #FF0000; font-weight: bold">
    </form>.......................................................................
    Here is the "InterviewCtrl.jsp"
    <%@ page language="java" import="java.util.*"%>
    <%@ page import="hrm.CandidateMgr" %>
    <%@ page session="false" %>
    <jsp:useBean id="candidate" class="hrm.CandidateMgr" scope="request"/>
    <jsp:setProperty name="candidate" property="*"/>
    <%-- Execute the addInter() method on the bean and check if it is true or false.-- %>
    <%-- if it's true then display a confirmation message "InterConfirm.html" --%>
    <%-- else display InterError.html --%>
    <%
    String nextPage ="MainForm.jsp";
    if(candidate.addInter()){
         nextPage="InterConfirm.html";
         }else{
         nextPage="InterError.html";
    %>
    <jsp:forward page="<%=nextPage%>"/>.......................................................................
    Here is the error:(I mark it in my bean also)
    root cause
    java.lang.NullPointerException
         at hrm.CandidateMgr.addInter(CandidateMgr.java:652)
         at org.apache.jsp.InterviewCtrl_jsp._jspService(InterviewCtrl_jsp.java:66)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    I use JSP 1.2 , mySQL with TOMCAT. My table name is Candidate.It's fields are as follows:
    Candidate(nicNo,title,fName,civilStatus,tele,eduQua)
    Can anybody tell me whats going on, help me to solve this please.
    Thanks.

    you should try something different, since you are mixing up a lot of code.
    1) create a separate method just to connect and disconnect from a database;
    2) use the value entered and see if you can find a record in the table. If the record is there, then you should re-direct your jsp to a jspError, else goes to another form.
    the code below give you some idea
          if( sAction.equals("Add1") ) {
            sITEM = request.getParameter("parameter1");
            try {
              itemmaster.connect();
              itemmaster.viewitemmaster( sITEM );
              rs = itemmaster.getRs();
              if( rs.next() ) {
                sURL = "additemmaster1.jsp";
              else {
                request.setAttribute( "asITEM", sITEM );
                sURL = "additemmaster2.jsp";
            finally {
              rs.close();
              itemmaster.disconnect();
          }

  • Different methods involved in insertion of records into the table

    hi all,
    i am using Forms [32 Bit] Version 6.0.8.24.1 (Production)
    Oracle Database 10g Release 10.2.0.1.0 - Production
    i have parameters like emp_code(optional) and year(mandatory field-four digit year).
    Based on the parameter i have to get the details from one table and those records should be inserted into other table along with additions columns(by hardcoding the additional columns).
    To acheive this i am planning to get a cursor by selecting the necessay fields from the table passing the parameters in the where clause of the cursor.
    by looping through the cursor i will insert the records into the other table.
    here the thing is the data is going to be huge (since year is the parameter).
    so is my approach leads to the performance issue.
    i heard that there are different method of insetions,
    can anybody suggest me the better way(peformance wise) other than what i have mentioned (if you are aware of)..
    Thanks..

    This is not really a Forms issue, so you'd better go to the sql and pl/sql forum. Here, this question has been asked many times: how do I insert large volumes of data in a table?
    insert into ...
    select ....
    or CTAS (create table as select ....)
    by looping through the cursor i will insert the records into the other table.That is really the worst idea. If you can do it in sql (insert into ... select ...) DON'T do it in pl/sql.

  • Insert single column into oracle table

    i have a table t1 in whcih only one column is there
    Create table t1
    a number);now i need to load this column from a excel sheet.
    it have many rows and many column but need only corresponding column.
    please suggeest any way apart from external table and sql laoder.
    thanks

    No problem if you have thousands of rows.
    Say the value you want to insert is in column A of your excel file.
    In column B use the following formula:
    =CONCATENATE("insert into t1 values (";A1;");")And copy this formula to all other rows.
    Then select all the B column, copy it and paste it in a notepad file.
    Call the file as you want, for example c:\ins.sql
    open sqlplus and run
    SQL> @c:\ins.sqlAt the end don't forget to commit...
    Max
    [My Italian Oracle blog|http://oracleitalia.wordpress.com/2010/01/10/crittografia-in-plsql-utilizzando-dbms_crypto/]

  • Record not inserting into the table through Forms 10g

    Hi all,
    I have created a form in 10g(10.1.2.0.2) based on just one table that has 4 columns(col1, col2, col3, col4).
    Here col1, col2 and col3 are VARCHAR2 and col4 is date and all the columns are not null columns(There are no primary and foriegn key constrains, which means duplicates are allowed).
    My form contains 2 blocks where block 1 has one text item (col1) and 3 buttons (Delete, Save, Exit).
    And block2 is a database block and has col2,col3,col4 which are in tabluar layout frame displaying 10 records.
    When the form is opened the cursor has to be in block1.col1 for querrying. Here i enter a value in col1, and then when I click on col2 in the block2, then I put execute_query in new_block_instance of block2, which displays the records.
    The block2 properties are not updatable, insertable and query is allowed.
    Everything is working good until here. But here in the block2 when I want to insert another record into the table, by navigating all the way down to the last empty record and entering the new values for col2, col3 and col4 And then Ctrl+S will display the message "*FRM-40400: Transaction complete: 1 record applied and saved.*" But actually the record is not inserted into the table.
    I also disabled the col4 by setting the Enabled property to No, since while inserting new record the date have to be populated into it and it shouldnt be changed by the user. And im populating the sysdate into the new record by setting Intial Value property to *$$DATE$$*.
    And another requirement which I could not work arround here is that, the col3 also should be populated with the username of the user while inserting.
    please help me...

    Hi Sarah,
    I do not want to update the existing record. So I kept Udate Allowed to No in property palette for the items in block2.
    Do I have to do this property at block level also?
    I'm inserting a new record here.
    Edited by: Charan on Sep 19, 2011 8:48 AM

  • Inserting an image into a table using the iPad?

    I am trying to make an evidence table in pages. I need to insert photographs into a table, next to the related statement. Is it possible to insert a photograph into the table on an iPad as I obviously don't have the 'command' button that others are using. If this is possible I want to be able to insert the picture as a predefined size?

    Hi,
    Yes, you can do this by using the Word Edit Cell VI under Report Generation>>Word Specific>>Word Tables in your block diagram functions pallette.  After creating a table, you can edit specific cells and send the file path of the image saved on your computer to that specific cell.  I put together an example that I've attached here as well to help you out with this.
    Regards,
    Austin S.
    National Instruments
    Academic Field Engineer
    Attachments:
    RGTWordImageInTable.vi ‏14 KB

  • SQL Server 2012 Management Studio: Creating a Database and a dbo Table. Inserting VALUES into the table. How to insert 8 Values for future use in XQuery?

    Hi all,
    In my SQL Server 2012 Management Studio (SSMS2012), I tried to create a Database (MacLochainnsDB) and a dbo Table (marvel). then I wanted insert 8 VALUES into the Table by using the following code:
    USE master
    IF EXISTS
    (SELECT 1
    FROM sys.databases
    WHERE name = 'MacLochlainnsDB')
    DROP DATABASE MacLochlainnsDB
    GO
    CREATE DATABASE MacLochlainnsDB
    GO
    CREATE TABLE [dbo].[marvel] (
    [avenger_name] [char] (30) NULL)
    INSERT INTO marvel
    (avenger_name)
    VALUES
    ('Hulk', 1),
    ('Iron Man', 2),
    ('Black Widow', 3),
    ('Thor', 4),
    ('Captain America', 5),
    ('Hawkeye', 6),
    ('Winter Soldier', 7),
    ('Iron Patriot', 8)
    I got the following error Message:
    Msg 110, Level 15, State 1, Line 5
    There are fewer columns in the INSERT statement than values specified in the VALUES clause. The number of values in the VALUES clause must match the number of columns specified in the INSERT statement.
    How can I correct this problem?
    Please kindly help and advise.
    Thanks in advance,
    Scott Chang
    P. S.
    The reason I tried to create the Database, dbo Table, and then to insert the VALUES is to learn the following thing:
    You can query the entire node tree with the following xquery statement because it looks for the occurrence of any node with the /* search string:
    DECLARE @x xml;
    SET @x = N'<marvel>
    <avenger_name>Captain America</avenger_name>
    </marvel>';
    SELECT @x.query('/*');
    You can query the avenger_name elements from the marvel_xml table with the following syntax:
    SELECT xml_table.query('/marvel/avenger_name')
    FROM marvel_xml;
    It returns the following set of avenger_name elements:
    <avenger_name>Hulk</avenger_name>
    <avenger_name>Iron Man</avenger_name>
    <avenger_name>Black Widow</avenger_name>
    <avenger_name>Thor</avenger_name>
    <avenger_name>Captain America</avenger_name>
    <avenger_name>Hawkeye</avenger_name>
    <avenger_name>Winter Soldier</avenger_name>
    <avenger_name>Iron Patriot</avenger_name>
    You can query the fourth avenger_name element from the marvel_xml table with the following xquery statement:
    SELECT xml_table.query('/marvel[4]/avenger_name')
    FROM marvel_xml;
    It returns the following avenger_name element:
    <avenger_name>Thor</avenger_name>

    Hi Scott,
    The master database records all the system-level information for a SQL Server system, so best practise would be not to create any user-defined
    object within it.
    To change your default database(master by default) of your login to another, follow the next steps so that next time when connected you don't have to use "USE dbname" to switch database.
    Open SQL Server Management Studio
    --> Go to Object explorer(the left panel by default layout)
    --> Extend "Security"
    --> Extend "Logins"
    --> Right click on your login, click "propertites"
    --> Choose the "Default database" at the bottom of the pop-up window.
    --or simply by T-SQL
    Exec sp_defaultdb @loginame='yourLogin', @defdb='youDB'
    Regarding your question, you can reference the below.
    SELECT * FROM master.sys.all_objects where name ='Marvel'
    --OR
    SELECT OBJECT_ID('master.dbo.Marvel') --if non empty result returns, the object exists
    --usually the OBJECT_ID is used if a if statement as below
    IF OBJECT_ID('master.dbo.Marvel') IS NOT NULL
    PRINT ('TABLE EXISTS') --Or some other logic
    What is the sys.all_objects? See
    here.
    If you have any question, feel free to let me know.
    Eric Zhang
    TechNet Community Support

  • The record is not added into the table.

    Hi,
    I am new to Hibernate.
    I have contact.hbm.xml
    <?xml version="1.0"?>
    <!DOCTYPE hibernate-mapping PUBLIC
    "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
    "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
    <hibernate-mapping>
    <class name="Contact" table="CONTACT">
    <id name="id" type="string" column="ID" >
    <generator class="assigned"/>
    </id>
    <property name="firstName">
    <column name="FIRSTNAME" />
    </property>
    <property name="lastName">
    <column name="LASTNAME"/>
    </property>
    <property name="email">
    <column name="EMAIL"/>
    </property>
    </class>
    </hibernate-mapping>
    And I have hibernate.cfg.xml
    <?xml version='1.0' encoding='utf-8'?>
    <!DOCTYPE hibernate-configuration PUBLIC
    "-//Hibernate/Hibernate Configuration DTD//EN"
    "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
    <hibernate-configuration>
    <session-factory>
    <property name="hibernate.connection.driver_class">sun.jdbc.odbc.JdbcOdbcDriver</property>
    <property name="hibernate.connection.url">jdbc:odbc:test</property>
    <property name="hibernate.connection.username"></property>
    <property name="hibernate.connection.password"></property>
    <property name="hibernate.connection.pool_size">10</property>
    <property name="show_sql">true</property>
    <!-- <property name="dialect">org.hibernate.dialect.MySQLDialect</property> -->
    <property name="dialect">com.hxtt.support.hibernate.HxttAccessDialect</property>
    <property name="hibernate.hbm2ddl.auto">update</property>
    <!-- Mapping files -->
    <mapping resource="contact.hbm.xml"/>
    </session-factory>
    </hibernate-configuration>
    And my client program to add a record into the table is as follows..
    File f=new File("..src/com/hibernateaction/chapter01/hello/hibernate.cfg.xml");
    Configuration cfg = new Configuration().addFile(f);
    Iterator itr=cfg.getClassMappings();
    while(itr.hasNext())
         System.out.println("V="+itr.next());
    SessionFactory sessionFactory = cfg.configure().buildSessionFactory();
    session =sessionFactory.openSession();
    System.out.println("Inserting Record");
    Contact contact = new Contact();
    contact.setId("3");
    contact.setFirstName("Senniappan");
    contact.setLastName("Gounder");
    contact.setEmail("[email protected]");
    session.save(contact);
    System.out.println("Done");
    session.flush();
    session.close();
    The output displayed as "Done" and "Hibernate: insert into CONTACT (FIRSTNAME, LASTNAME, EMAIL, ID) values (?, ?, ?, ?) ".
    But there is no record is added into the DB.
    Kindly help in this regards.

    I used transaction.commit() it workd fine. Thanks Balu.
    My query is, is it necessary to start a transaction to add a single row into the table? Could u brief about this implementation?

  • How to insert single quote in to the table

    Pl help me out in how to insert the single quote ie ' into the table. If there is no other way, i will go for some other alternative
    Regards,
    Basavaraju

    SQL> desc varchar2_test
    Name                                      Null?    Type
    TEXT                                               VARCHAR2(4000)
    SQL> insert into varchar2_test values ('''ABCDEFGHIJ''');
    1 row created.
    SQL> select * from varchar2_test;
    TEXT
    'ABCDEFGHIJ'Thanks,
    BB

  • Insert multiple records into a table(Oracle 9i) from a single PHP statement

    How can I insert multiple records into a table(Oracle 9i) from a single PHP statement?
    From what all I've found, the statement below would work if I were using MySQL:
         insert into scen
         (indx,share,expire,pitch,curve,surface,call)
         values
         (81202, 28, 171, .27, 0, 0, 'C' ),
         (81204, 28, 501, .25, 0, 0, 'C' ),
         (81203, 17, 35, .222, 0, 0, 'C' ),
         (81202, 28, 171, .27, 2, 0, 'C' ),
         (81204, 28, 501, .20, 0, 1, 'C' ),
         (81203, 28, 135, .22, 1, 0, 'C' )
    The amount of records varies into the multiple-dozens. My aim is to utilize the power of Oracle while avoiding the i/o of dozens of single-record inserts.
    Thank you,
    Will

    You could look at the INSERT ALL statement found in the documentation here:
    http://download.oracle.com/docs/cd/B10501_01/server.920/a96540/statements_913a.htm#2133161
    My personal opinion is that you probably won't see any benefit because under the hood I think Oracle will still be doing single row inserts. I could be wrong though.
    The only way to confirm was if you did a test of multiple inserts vs an INSERT ALL, that is if the INSERT ALL met your requirements.
    HTH.

  • INSERTION OF XML DATA INTO THE TABLE USING XMLDOM

    hello,
    i am using XMLDOM to insert the data into the table
    i am using different function of it.
    but i am facing the problem to retrive the the multiple entry.
    like in my example i have two entry of the ' po number '
    & i am using the function
    dbms_xmldom.item(l_nodelist, 0)
    i which i have to pass index no.
    & through this i am getting only single entry according to the index no.
    Example on which i am working is
    declare
    l_xml_data CLOB;
    l_xml_doc dbms_xmldom.domdocument;
    l_nodelist dbms_xmldom.DOMNodeList;
    l_node dbms_xmldom.domnode;
    l_xmltype XMLTYPE;
    l_po_num VARCHAR2(30);
    l_cust_ord VARCHAR2(30);
    l_item_code VARCHAR2(30);
    begin
    l_xml_data := '<?xml version="1.0" encoding="UTF-8"?>
    <!--DOCTYPE MobileInventoryResponse SYSTEM "MobileInventoryResponse.dtd"-->
    <MobileInventoryResponse>
         <message>
              <message-header>
                   <message-id>16244182</message-id>
                   <transaction-name>ship-advice</transaction-name>
                   <partner-name>cbeyond</partner-name>
                   <source-url>http://www.brightpoint.com</source-url>
                   <create-timestamp>20080826150709</create-timestamp>
                   <response-request>1</response-request>
              </message-header>
              <ship-advice>
                   <header>
                        <customer-id>297859</customer-id>
                        <shipment-information>
                             <ship-first-name>RA_13Aug_1</ship-first-name>
                             <ship-last-name>MIND</ship-last-name>
                             <ship-address1>test</ship-address1>
                             <ship-city>test</ship-city>
                             <ship-state>VA</ship-state>
                             <ship-post-code>22102-4931</ship-post-code>
                             <ship-country-code>US</ship-country-code>
    <ship-phone1>0040726335068</ship-phone1>
    <ship-email>[email protected]</ship-email>
    <ship-via>FX01</ship-via>
    <ship-request-date>20080826</ship-request-date>
    <ship-request-warehouse>CBY1</ship-request-warehouse>
    </shipment-information>
    <purchase-order-information>
    <purchase-order-number>380928</purchase-order-number>
    <purchase-order-number>380929</purchase-order-number> ----modi by Ananda Dubey
    <account-description/>
    <purchase-order-amount>0.0</purchase-order-amount>
    <currency-code>USD</currency-code>
    </purchase-order-information>
    <order-header>
    <customer-order-number>0002759</customer-order-number>
    <customer-order-date>20080826</customer-order-date>
    <order-sub-total>19.0</order-sub-total>
    <order-discount>0.0</order-discount>
    <order-tax1>0.0</order-tax1>
    <order-tax2>0.0</order-tax2>
    <order-tax3>0.0</order-tax3>
    <order-shipment-charge>18.0</order-shipment-charge>
    <order-total-net>0.0</order-total-net>
    <order-status>Completed</order-status>
    <order-type/>
    <brightpoint-order-number>35028788</brightpoint-order-number>
    <warehouse-id>CBY1</warehouse-id>
    <ship-date>20080826</ship-date>
    </order-header>
    </header>
    <detail>
    <line-item>
    <line-no>1</line-no>
    <item-code>SKU1</item-code>
    <universal-product-code>0</universal-product-code>
    <ship-quantity>1.0</ship-quantity>
    <unit-of-measure>EA</unit-of-measure>
    <serial-list>
    <serial-numbers>
    <esn>TIMI000013</esn>
    </serial-numbers>
    </serial-list>
    <line-status/>
    <base-price>0.0</base-price>
    <line-discount>0.0</line-discount>
    <line-tax1>0.0</line-tax1>
    <line-tax2>0.0</line-tax2>
    <line-tax3>0.0</line-tax3>
    <bill-of-lading>929406733828</bill-of-lading>
    <scac>FX01</scac>
    </line-item>
    </detail>
    </ship-advice>
    <transactionInfo>
                   <eventID>16244182</eventID>
              </transactionInfo>
         </message>
    </MobileInventoryResponse>';
    l_xml_doc := dbms_xmldom.newDomDocument(l_xml_data);
    -- Method 1 to get data
    l_nodelist := dbms_xmldom.getelementsbytagname(l_xml_doc, 'purchase-order-number');
    l_node := dbms_xmldom.item(l_nodelist, 0); -- gets first item from list
    l_po_num := dbms_xmldom.getnodevalue(dbms_xmldom.getfirstchild(l_node));
    dbms_output.put_line(l_po_num);
    l_nodelist := dbms_xslprocessor.selectnodes(dbms_xmldom.makenode(l_xml_doc),
    '/MobileInventoryResponse/message/ship-advice/detail/line-item/item-code');
    l_node := dbms_xmldom.item(l_nodelist, 0); -- gets first item from list
    l_item_code := dbms_xmldom.getnodevalue(dbms_xmldom.getfirstchild(l_node));
    dbms_output.put_line(l_item_code);
    l_xmltype := XMLTYPE(l_xml_data);
    l_cust_ord := l_xmltype.extract('/MobileInventoryResponse/message/ship-advice/header/order-header/customer-order-number/text()').getStringVal();
    dbms_output.put_line(l_cust_ord);
    dbms_xmldom.freeDocument(l_xml_doc);
    end;
    /

    In the following code
    l_nodelist := dbms_xmldom.getelementsbytagname(l_xml_doc, 'purchase-order-number');
    l_node := dbms_xmldom.item(l_nodelist, 0); -- gets first item from listYou need to understand what the second parm on the .item call does. See [dbms_xmldom.item|http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_xmldom.htm#i1126138]
    The nodelist is a 0 based array of information and you are only requesting to pull the node info in the first array position. So to get the info in the second array position, you need to use ", 1)". You can also use .getLength and a loop to parse through everything in the node list.

  • How to insert the data which is present in the variable into the table

    Hi,
    Let's consider that I have one table and I have stored the table column names in one variable and their values in another variable.
    I want to insert the data that is present in the variables into the table.
    I tried the following way :
    Declare
    V_columns    Varchar2(50) := 'Empno';
    V_values       Number(10) := 101;
    Begin
    Insert Into Emp (V_columns) Values (V_values);
    End;
    The above procedure gives an error : PL?SQL : ORA-00904 : "V_COLUMNS": invalid identifier
    Using the Execute Immediate, we can insert the data which is present in the variables into the table.
    Is there any other way to insert the data which is present in the variable into the table..?
    Can anyone please give me the solution..?
    Thanks..

    plz use this...
    DECLARE
       v_columns   VARCHAR2 (50) := 'Empno';
       v_values    NUMBER (10)   := 101;
    BEGIN
       EXECUTE IMMEDIATE    'Insert Into Emp ('
                         || v_columns
                         || ') Values ('
                         || v_values
                         || ')';
       COMMIT;
    END;

  • How to insert the image or logo into the table as a field in webdynpro abap

    Hi Friends,
    Please tell me how to insert the image or logo into the table as a field in webdynpro abap.........

    Hi Alagappan ,
          In your view layout you take table UI element and then you bind it with some context nodes.
    The attributes of your nodes comes as a field.
    Now in these fields you can set various properties and image is one of them.
    Go to ->
    1. View Layout -> Right Click on ROOTUIELEMENTCONTAINER -> INSERT ELEMENT -> TABLE
    2. Right click on table -> Create Binding.
       Here you have to bind it with the appropriate context node.
    You will get two properties here
    a- Standard Cell Editor :- ( make it image )
    b- Standard properties :- ( If required set image properties ).
    3. If you want put image from out side then import it as a mime object and set the source of your table field ( used as a image )
    also have a look :-
    [Image Properties|http://help.sap.com/saphelp_nw04/helpdata/en/f3/1a61a9dc7f2e4199458e964e76b4ba/content.htm]
    Hope this will solve your problem.
    Reply if any case of any issue.
    Thanks & Regards,
    Monishankar C

Maybe you are looking for

  • Safari Browser Crashes - How to Reset the IPAD-2?

    I have the latest IOS 8.x installed on my IPAD-2 but haven't been able to get the Safari Browser to work for several months.  When I click Safari it opens for a few seconds then shuts down...I'm not able to  input any web sites. I tried settings->saf

  • Send Alerts(e-mail) for errors in SXMB_MONI(message mapping exceptions)

    Good afternoon !         I´m configuring SAP Netweaver PI 7.0(SP13) to use Alert Framework to send Alerts when errors occurs in the interfaces processing.         I just achieved configure to send alerts when errors ocurrs in the Adapter Framework bu

  • Mac Contacts changes are not updated on iCloud

    My Mac and iPad are both linked to iCloud. Almost everything syncs perfectly. In Contacts I can make changes/additions on the iPad or in iCloud on the web, and the changes propagate to the others, including the Mac. HOWEVER, if I make changes to Cont

  • Album Art not making it to iPhone 4S correctly

    My Macbook Pro & PC running iTunes 11.01.12 do not transfer correct album art to my iPhone 4S. While playing music some ablum art looks like picture of a music video, or playing Snoop Dogg showing a picture of Mariah Carey

  • How to use notifier

    Hello, I will try to creat extention for photoshop in Flash Builder 4  using CS Extention Toolkit 3.4. For automatic or something happen, i think we have to used notifier but i do't no how to used it and  where i have to code that thing. Or any other