Loading ...
Sorry, an error occurred while loading the content.
 

insert the value into the column

Expand Messages
  • ching
    When I transfer the xml into database, I want to insert immediately the value into the column. examples: my database*****************************************
    Message 1 of 2 , Mar 5, 2002
      When I transfer the xml into database, I want to insert immediately the
      value into the column.

      examples: my database*****************************************
      NAME Null?
      TYPE
      ----------------------------------------------------- -------- -------------
      ID NOT NULL
      VARCHAR2(15)
      QUANTITY
      NUMBER(10)
      PRICE
      NUMBER(10,2)
      UPLOAD_TIME NOT NULL DATE

      The values of (ID, QUANTITY and PRICE) are written in the xml document, but
      UPLOAD_TIME is not.

      my xml document *********************************************
      <?xml version="1.0" encoding="UTF-8"?>
      <Hotels>
      <Hotel>
      <ID>141105-1</ID>
      <QUANTITY >4</QUANTITY >
      <Price>3600.32</Price>
      </Hotel>
      </Hotels>


      When the Transfer.java was executed, the value of UPLOAD_TIME also can
      produce immediately.
      Can you give me some suggestions?
      How can I catch the column of my database?
      Thanks!!
    • Ronald Bourret
      UPLOAD_TIME is not in the XML document. Therefore, there is no data to transfer to the database. The best way to solve this is to write an INSERT trigger. This
      Message 2 of 2 , Mar 6, 2002
        UPLOAD_TIME is not in the XML document. Therefore, there is no data to
        transfer to the database. The best way to solve this is to write an
        INSERT trigger. This will be executed when the row is inserted. In it,
        you can write code to insert the current time into the UPLOAD_TIME
        column.

        -- Ron

        ching wrote:
        >
        > When I transfer the xml into database, I want to insert immediately the
        > value into the column.
        >
        > examples: my database*****************************************
        > NAME Null?
        > TYPE
        > ----------------------------------------------------- -------- -------------
        > ID NOT NULL
        > VARCHAR2(15)
        > QUANTITY
        > NUMBER(10)
        > PRICE
        > NUMBER(10,2)
        > UPLOAD_TIME NOT NULL DATE
        >
        > The values of (ID, QUANTITY and PRICE) are written in the xml document, but
        > UPLOAD_TIME is not.
        >
        > my xml document *********************************************
        > <?xml version="1.0" encoding="UTF-8"?>
        > <Hotels>
        > <Hotel>
        > <ID>141105-1</ID>
        > <QUANTITY >4</QUANTITY >
        > <Price>3600.32</Price>
        > </Hotel>
        > </Hotels>
        >
        > When the Transfer.java was executed, the value of UPLOAD_TIME also can
        > produce immediately.
        > Can you give me some suggestions?
        > How can I catch the column of my database?
      Your message has been successfully submitted and would be delivered to recipients shortly.