Insert into ebs dates?

Hi all,
I have 3 tables with dates and 3 forms for insert new dates into tables and update
Theres 1000 records on each tables.
Is there any way to I import this tables with dates and forms with insert/update into
EBS 12? (I have dump file too)
Gordan

All 3 tables was from system spaces from oracle 10g
and all 3 forms are from forms developer generated
with reference at 3 tables

Similar Messages

  • How to insert into mysql the creation time and modification time from java?

    first how?
    Second what is better from create the date from java or do it from mysql?
    thanks in advace
    Pedro

    One way is to use the GetDate function in mysql. This will set the date as you insert data. insert into table(date) values(getdate())
    Anytime you modifiy the table just call the function again and update its fields.
    Dont know which is beter to do. In java or on the database side.

  • Error inserting into database

    need help,am tryin to insert data into my database which contains date,
    names,phone,address and deposit and it's giving this error message:
    java.lang.ClassCastException:java.util.Date cannot be cast to java.sql.Date.
    somebody help me please.thanks in advance.
    code:
    '\n'
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.sql.*;
    import java.text.*;
    public class NewCustomerRecord extends JFrame{
         private JTextField firstnameF,othernameF,phoneF,addressF,depositF,currentF,dateF;
         private JButton registerbutton;
         private Connection con;
         private Statement st;
         private ResultSet set;
         private PreparedStatement stat;
         public NewCustomerRecord(){
              //super(f,"",true);
              JPanel panel = new JPanel();
              panel.setLayout(null);
              JLabel firstL = new JLabel("First Name:");
              firstL.setBounds(5,15,80,20);
              panel.add(firstL);
              firstnameF = new JTextField();
              firstnameF.setBounds(70,15,100,20);
              panel.add(firstnameF);
              JLabel otherL = new JLabel("Other Names:");
              otherL.setBounds(175,15,80,20);
              panel.add(otherL);
              othernameF = new JTextField();
              othernameF.setBounds(255,15,100,20);
              panel.add(othernameF);
              JLabel phoneL = new JLabel("Phone No.:");
              phoneL.setBounds(5,40,80,20);
              panel.add(phoneL);
              phoneF = new JTextField();
              phoneF.setBounds(70,40,100,20);
              panel.add(phoneF);
              JLabel addressL = new JLabel("Address:");
              addressL.setBounds(185,40,80,20);
              panel.add(addressL);
              addressF = new JTextField();
              addressF.setBounds(255,40,100,20);
              panel.add(addressF);
              JLabel depositL = new JLabel("Deposit:");
              depositL.setBounds(5,65,60,20);
              panel.add(depositL);
              depositF = new JTextField();
              depositF.setBounds(70,65,100,20);
              panel.add(depositF);
              /*JLabel currentL = new JLabel("Current Bill:");
              currentL.setBounds(135,65,80,20);
              panel.add(currentL);
              currentF = new JTextField();
              currentF.setBounds(205,65,50,20);
              panel.add(currentF);*/
              JLabel dateL = new JLabel("Date:");
              dateL.setBounds(185,65,50,20);
              panel.add(dateL);
              dateF = new JTextField();
              dateF.setBounds(255,65,100,20);
              panel.add(dateF);
              registerbutton = new JButton("Register Customer");
              registerbutton.setBounds(115,100,145,20);
              registerbutton.addActionListener(new ActionListener(){
                   public void actionPerformed(ActionEvent e){
                        insertRecord();
                        dispose();
              registerbutton.setMinimumSize(new Dimension(50,20));
              panel.add(registerbutton);
              add(panel);
              setSize(400,200);
              setDefaultCloseOperation(EXIT_ON_CLOSE);
         public void insertRecord(){
              double bal=0.0;
              String s=depositF.getText();
              double dep = Double.parseDouble(s);
              bal+=dep;
              //String ss=dateF.getText();
              //short dd=Short.parseShort(ss);
              String ss=Double.toString(dep);
              String bb=Double.toString(bal);
              String fullName=firstnameF.getText()+"\t"+othernameF.getText();
              try{
                   Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                   con=DriverManager.getConnection("jdbc:odbc:sparkletransaction","","");
                   SimpleDateFormat sdf = new SimpleDateFormat("dd/mm/yy");  //added
                   Date d = (Date)sdf.parse(dateF.getText());
                   //java.sql.Date date = new java.sql.Date();
                   //date.setTime(d.getTime());
                   String insert="INSERT INTO personaltransaction(date,name,phone,addres,deposit,balance) VALUES(?,?,?,?,?,?)";
                   //insert=insert+;
                   stat=con.prepareStatement(insert);
                   stat.setDate(1,d);
                   stat.setString(2,fullName);
                   stat.setString(3,phoneF.getText());
                   stat.setString(4,addressF.getText());
                   stat.setString(5,ss);
                   stat.setString(6,bb);
                   stat.executeUpdate();
                   stat.close();
              catch(Exception e){
                   System.out.println(e);
         public static void main(String[] arg){
              new NewCustomerRecord().setVisible(true);
    }

    java.lang.ClassCastException:java.util.Date cannot be
    cast to java.sql.Date.
    Hint:
    public static java.sql.Date convert2SqlDate(java.util.Date date) {
        return new java.sql.Date(date.getTime());
    }

  • Error while inserting into blob column through PL/SQL

    Hi All,
    I am trying to insert into column having blob as datatype.
    INSERT INTO imagedb(image_name, content,description) VALUES ('logo.png',
    ?{file 'c:\logo.png'}, 'logo');
    it gives me error Unknown JDBC escape sequence:
    Is there anything wrong in above insert syntax for inserting into BLOB data type.
    Can any body please help me.
    Regards,
    Hiren

    It is not valid SQL as far as Oracle SQL is concerned. I assume that the file construct is suppose to replace that with the contents of the file?
    What happens when the file size exceeds the max length of the SQL command?
    And do you have any idea what will happen to the SQL Shared Pool on Oracle that needs to store the entire SQL command for every single SQL command passed to it? The whole purpose of the Shared Pool is for storing shared SQL. Not non-sharable SQL containing hardcoded values.
    Bind variable are to be used.. if you expect Oracle to perform like only Oracle can.
    And my bet is that you have not even bothered to read [url http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14249/toc.htm]Oracle® Database Application Developer's Guide - Large Objects guide....

  • Best Practice to fetch SQL Server data and Insert into Oracle Tables

    Hello,
    I want to read sqlserver data everry half an hour and write into oracle tables ( in two different databases). What is the best practice for doing this?
    We do not have any database dblinks from oracle to sqlserver and vice versa.
    Any help is highly appreciable?
    Thanks

    Well, that's easy:
    use a TimerTask to do the following every half an hour:
    - open a connection to sql server
    - open two connections to the oracle databases
    - for each row you read from the sql server, do the inserts into the oracle databases
    - commit
    - close all connections

  • Splitting data in one row and inserting into seperate rows into a new table

    i have a table table1 like the following
    column1     column2          column3
    a     b,cbdm,d     hj
    ba     hello          man
    i have to insert data from this table to table2 in the following format
    Column1          column2          column3
    a          b          hj
    a          cbdm          hj
    a          d          hj
    ba          hello          man
    It is like if data in column2 is seperated by comma i have to insert it into each sperate row
    I have to write a single procedure which will do the above. Please,Please help me
    I am very new to SQL

    I am absolutely agreeing with Billy.
    But I think u will be able to learn a lot if u try to understand the following code
    sql>select * from t1;
         C1 C2 C3
         a  b,cdbm,d  hj 
         ba  hello  man 
         x  aa,d,df  yy 
    sql>select * from t2;
         no rows selected
    sql>insert into t2
          select col1,col2,col3
         from (
         select t1.c1 col1,t1.c2 col4,t1.c3 col3,
         substr(t1.c2,
                  case n when 1 then 1 else instr(t1.c2,',',1,n-1)+1 end,
                       (case instr(t1.c2,',',1,n) when 0 then length(t1.c2)+1 else instr(t1.c2,',',1,n) end) -
                      (case n when 1 then 1 else instr(t1.c2,',',1,n-1)+1 end)) col2,n
           from t1,(select c1,c2,c3,
                              row_number() over(partition by c1,c2,c3 order by c1) n
                      from t1 connect by level <=
                                                   (length(t1.c2)-length(replace(t1.c2,',','')))) t2
           where t1.c1 = t2.c1)
         where not(n != 1 and col4=col2);
    sql>select * from t2;
          C1 C2 C3
          a  b  hj 
          a  cdbm  hj 
          a  d  hj 
          ba  hello  man 
          x  aa  yy 
          x  d  yy 
          x  df  yy                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Using sql load insert multiple fields data into a single column in database

    Hi ,
    I have my log file in sun OS box something like this
    =======
    (07/29/2009 00:02:24.467) 367518 (07/29/2009 00:02:26.214) 949384011
    (07/29/2009 00:02:26.236) 3675 (07/29/2009 00:02:28.207) 949395117
    (07/29/2009 00:02:28.240) 337710 (07/29/2009 00:02:30.621) 949400864
    =============
    I am trying to insert the data into oracle data base as follows.
    =============================
    column1 : (07/29/2009 00:02:24.467)
    column2 : 367518
    column3 : (07/29/2009 00:02:26.214)
    column4 : 949384011
    ===========================
    Can anyone help me with the control file format?
    someone suggested me the code below.
    ==========
    LOAD DATA
    INFILE 'D:\work\load.txt'
    INTO TABLE sample
    (col1 POSITION(02:24) char,
    col2 POSITION(27:32) INTEGER EXTERNAL,
    col3 POSITION(35:57) CHAR,
    col4 POSITION(60:68) INTEGER EXTERNAL
    ===========
    but this works only for the fixed length data? Please help

    user11744904 wrote:
    Hi ,
    I have my log file in sun OS box something like this
    =======
    (07/29/2009 00:02:24.467) 367518 (07/29/2009 00:02:26.214) 949384011
    (07/29/2009 00:02:26.236) 3675 (07/29/2009 00:02:28.207) 949395117
    (07/29/2009 00:02:28.240) 337710 (07/29/2009 00:02:30.621) 949400864
    =============
    I am trying to insert the data into oracle data base as follows.
    =============================
    column1 : (07/29/2009 00:02:24.467)
    column2 : 367518
    column3 : (07/29/2009 00:02:26.214)
    column4 : 949384011
    ===========================
    Can anyone help me with the control file format?
    someone suggested me the code below.
    ==========
    LOAD DATA
    INFILE 'D:\work\load.txt'
    INTO TABLE sample
    (col1 POSITION(02:24) char,
    col2 POSITION(27:32) INTEGER EXTERNAL,
    col3 POSITION(35:57) CHAR,
    col4 POSITION(60:68) INTEGER EXTERNAL
    ===========
    but this works only for the fixed length data? Please helpIs the requirement to load all data in a single column or multiple columns? The thread subject and body are conflicting.

  • How to extract data from xml and insert into Oracle table

    Hi,
    I have a large xml file. which will have hundreds of the following transaction tags having column names and there values.
    There is a table one of the schema with coulums "actualCostRate","billRate"....etc.
    I need to extract the values of these columns and insert into the table
    <Transaction actualCostRate="0" billRate="0" chargeable="1" clientID="NikuUK" chargeCode="LCOCD1" externalID="L-RESCODE_UK1-PROJ_UK_CNT_GBP-37289-8" importStatus="N" projectID="TESTPROJ" resourceID="admin" transactionDate="2002-02-12" transactionType="L" units="11" taskID="5017601" inputTypeCode="SALES" groupId="123" voucherNumber="ABCVDD" transactionClass="ABCD"/>
    <Transaction actualCostRate="0" billRate="0" chargeable="1" clientID="NikuEU" chargeCode="LCOCD1" externalID="L-RESCODE_US1-PROJ_EU_STD2-37291-4" importStatus="N" projectID="TESTPROJ" resourceID="admin" transactionDate="2002-02-04" transactionType="L" units="4" taskID="5017601" inputTypeCode="SALES" groupId="124" voucherNumber="EEE222" transactionClass="DEFG"/>

    Re: Insert from XML to relational table
    http://www.google.ae/search?hl=ar&q=extract+data+from+xml+and+insert+into+Oracle+table+&btnG=%D8%A8%D8%AD%D8%AB+Google&meta=

  • How to read LONG RAW data from one  table and insert into another table

    Hello EVERYBODY
    I have a table called sound with the following attributes. in the music attribute i have stored some messages in the different language like hindi, english etc. i want to concatinate all hindi messages and store in the another table with only one attribute of type LONG RAW.and this attribute is attached with the sound item.
    when i click the play button of sound item the all the messages recorded in hindi will play one by one automatically. for that i'm doing the following.
    i have written the following when button pressed trigger which will concatinate all the messages of any selected language from the sound table, and store in another table called temp.
    and then sound will be played from the temp table.
    declare
         tmp sound.music%type;
         temp1 sound.music%type;
         item_id ITEM;
    cursor c1
    is select music
    from sound
    where lang=:LIST10;
    begin
         open c1;
         loop
              fetch c1 into tmp; //THIS LINE GENERATES THE ERROR
              temp1:=temp1||tmp;
              exit when c1%notfound;
         end loop;
    CLOSE C1;
    insert into temp values(temp1);
    item_id:=Find_Item('Music');
    go_item('music');
    play_sound(item_id);
    end;
    but when i'm clicking the button it generates the following error.
    WHEN-BUTTON-PRESSED TRIGGER RAISED UNHANDLED EXCEPTION ORA-06502.
    ORA-06502: PL/SQL: numeric or value error
    SQL> desc sound;
    Name Null? Type
    SL_NO NUMBER(2)
    MUSIC LONG RAW
    LANG CHAR(10)
    IF MY PROCESS TO SOLVE THE ABOVE PROBLEM IS OK THEN PLESE TELL ME THE SOLUTION FOR THE ERROR. OTHER WISE PLEASE SUGGEST ME,IF ANY OTHER WAY IS THERE TO SOLVE THE ABOVE PROBLEM.
    THANKS IN ADVANCE.
    D. Prasad

    You can achieve this in many different ways, one is
    1. Create another VO based on the EO which is based on the dest table.
    2. At save, copy the contents of the source VO into the dest VO (see copy routine in dev guide).
    3. commiting the transaction will push the data into the dest table on which the dest VO is based.
    I understand that if we attach VO object instance to region/page, we only can pull and put data in to only one table.
    if by table you mean a DB table, then no, you can have a VO based on multiple EOs which will do DMLs accordingly.Thanks
    Tapash

  • Most robust way to preserve data insert into CLOB?

    Hello.
    When inserting data into a CLOB column, some of the characters are not being preserved, such as ellipsis characters and other unusual characters. The data is being inserted via JDBC as a simple Java string sql statement in a Statement object. So, what is the most appropriate way to insert information into a CLOB such that all characters are preserved? (Do I have to use PreparedStatements or Clob.setString()?)
    For example, the following sql insert:
    "INSERT INTO t1 (myClob) VALUES ('Hello ... how are you?');"
    Will end up inserting something like:
    "Hello ? how are you?"
    The ellipsis character (Unicode U+2026, I believe) is changed to something else. How can I preserve this and other characters? Thanks in advance.

    Hi,
    Must have something to do with NCHAR or Unicode characters.
    Here are the notes i put in chapter 8 of my book, section 8.2.2
    Notes:
    Pre-10.2 JDBC does not support NCHAR literal (n'...') containing
    Unicode characters that cannot be represented in the database character
    set.
    Using 10.2 JDBC against 10.2 RDBMS, NCHAR literals (n'...')
    are converted to Unicode literals (u'...'); non-ASCII characters
    are converted to their corresponding Unicode escape sequence.
    Using 10.2 JDBC against pre-10.2 RDBMS, NCHAR literals (n'...') are
    not converted and generate undetermined content for characters that
    cannot be represented in the database character set.
    Fwiw, here is my blog entry relative to Lobs (CLOB, BLOB, BFILE) :
    http://db360.blogspot.com/2006/11/get-bolder-with-lobs-manipulation-in.html
    Kuassi, http://db360.blogspot.com/2006/08/oracle-database-programming-using-java_01.html

  • XML DATA INSERTION INTO TABLE

    I have xml data in this format and need to store in the lineitem table by generating three new values for each row ie line identifier(sys_guid),begin_date and end_date.
    <LineItems>
    <LineItem>
    <BASE_TYPE>SRV</BASE_TYPE>
    <ORDER_NUM>124089304</ORDER_NUM>
    <WIP_STATUS>S</WIP_STATUS>
    <WIP_STATUS_DATE>8/1/2006 8:44:55 PM</WIP_STATUS_DATE>
    <order_date>6/21/2006 12:00:00 AM</order_date>
    <IP_DATE>6/21/2006 12:00:00 AM</IP_DATE>
    </LineItem>
    <LineItem>
    <BASE_TYPE>SRV</BASE_TYPE>
    <ORDER_NUM>124089304</ORDER_NUM>
    <WIP_STATUS>S</WIP_STATUS>
    <WIP_STATUS_DATE>8/1/2006 8:44:55 PM</WIP_STATUS_DATE>
    <order_date>6/21/2006 12:00:00 AM</order_date>
    <IP_DATE>6/21/2006 12:00:00 AM</IP_DATE>
    </LineItem>
    </LineItems>
    and using this method to insert
    SELECT EXTRACTVALUE(VALUE(T), 'LineItem/BASE_TYPE'),
    EXTRACTVALUE(VALUE(T), 'LineItem/ORDER_NUM'),
    EXTRACTVALUE(VALUE(T), 'LineItem/WIP_STATUS'),
    EXTRACTVALUE(VALUE(T), 'LineItem/WIP_STATUS_DATE')),
    EXTRACTVALUE(VALUE(T), 'LineItem/ORDER_DATE')),
    EXTRACTVALUE(VALUE(T), 'LineItem/IP_DATE')),
    EXTRACTVALUE(VALUE(T), 'LineItem/SHIP_BY_DATE')),
    EXTRACTVALUE(VALUE(T), 'LineItem/CUSTOMER_SRC'),
    EXTRACTVALUE(VALUE(T), 'LineItem/CUSTOMER_LOC'),
    EXTRACTVALUE(VALUE(T), 'LineItem/CUSTOMER_NUM'),
    EXTRACTVALUE(VALUE(T), 'LineItem/ACCOUNT_TYPE'),
    EXTRACTVALUE(VALUE(T), 'LineItem/OVERPACK_FLAG'),
    EXTRACTVALUE(VALUE(T), 'LineItem/INTERNATIONAL_FLAG'),
    EXTRACTVALUE(VALUE(T), 'LineItem/MULTIPLE_SYSTEM_TIES'),
    EXTRACTVALUE(VALUE(T), 'LineItem/ORDER_TIE_NUM'),
    EXTRACTVALUE(VALUE(T), 'LineItem/TIE_STATUS'),
    EXTRACTVALUE(VALUE(T), 'LineItem/PK_GEN'),
    EXTRACTVALUE(VALUE(T), 'LineItem/QTY_REQD'),
    EXTRACTVALUE(VALUE(T), 'LineItem/WORKCENTER_ID'),
    EXTRACTVALUE(VALUE(T), 'LineItem/SI_NUMBER'),
    EXTRACTVALUE(VALUE(T), 'LineItem/MFG_SCHED_FACILITY_ID'),
    EXTRACTVALUE(VALUE(T), 'LineItem/MFG_FACILITY_ID'),
    EXTRACTVALUE(VALUE(T), 'LineItem/PILOT_NAME'),
    EXTRACTVALUE(VALUE(T), 'LineItem/ENG_HOLD_FLAG'),
    EXTRACTVALUE(VALUE(T), 'LineItem/SHORT_FLAG'),
    EXTRACTVALUE(VALUE(T), 'LineItem/OVR_SHORTAGE'),
    EXTRACTVALUE(VALUE(T), 'LineItem/USER_HOLD_FLAG'),
    EXTRACTVALUE(VALUE(T), 'LineItem/SHIP_TO_ADDRESS_SEQ_NUM'),
    EXTRACTVALUE(VALUE(T), 'LineItem/CALICO_REF_NUM'),
    EXTRACTVALUE(VALUE(T), 'LineItem/CONFIG_ID'),
    EXTRACTVALUE(VALUE(T), 'LineItem/TOTAL_UNITS_QTY'),
    EXTRACTVALUE(VALUE(T), 'LineItem/ORDER_TYPE'),
    EXTRACTVALUE(VALUE(T), 'LineItem/SKU'),
    EXTRACTVALUE(VALUE(T), 'LineItem/SUB_ASSEMBLY_NUMBER'),
    EXTRACTVALUE(VALUE(T), 'LineItem/BASE_ASM_FLAG'),
    EXTRACTVALUE(VALUE(T), 'LineItem/QTY_REQ'),
    EXTRACTVALUE(VALUE(T), 'LineItem/ORIGINAL_PART_NUMBER'),
    EXTRACTVALUE(VALUE(T), 'LineItem/SUBSTITUTE_PART_NUMBER'),
    EXTRACTVALUE(VALUE(T), 'LineItem/QTY_EXTENDED'),
    EXTRACTVALUE(VALUE(T), 'LineItem/ISSUE_CODE'),
    EXTRACTVALUE(VALUE(T), 'LineItem/ORIG_PART_DESC'),
    EXTRACTVALUE(VALUE(T), 'LineItem/ORIG_COMMODITY_CODE'),
    EXTRACTVALUE(VALUE(T), 'LineItem/ORIG_PRINT_ON_TRAVELER_FLAG'),
    EXTRACTVALUE(VALUE(T), 'LineItem/ORIG_BOX_CODE'),
    EXTRACTVALUE(VALUE(T), 'LineItem/SUBST_PART_DESC'),
    EXTRACTVALUE(VALUE(T), 'LineItem/SUBST_COMMODITY_CODE'),
    EXTRACTVALUE(VALUE(T), 'LineItem/SUBST_PRINT_ON_TRAVELER_FLAG'),
    EXTRACTVALUE(VALUE(T), 'LineItem/SUBST_BOX_CODE')
         BULK COLLECT INTO
    V_BASE_TYPE,
    V_ORDER_NUM,
    V_WIP_STATUS,
    V_WIP_STATUS_DATE,
    V_ORDER_DATE,
    V_IP_DATE,
    V_SHIP_BY_DATE,
    V_CUSTOMER_SRC,
    V_CUSTOMER_LOC,
    V_CUSTOMER_NUM,
    V_ACCOUNT_TYPE,
    V_OVERPACK_FLAG,
    V_INTERNATIONAL_FLAG,
    V_MULTIPLE_SYSTEM_TIES,
    V_ORDER_TIE_NUM,
    V_TIE_STATUS,
    V_PK_GEN,
    V_QTY_REQD,
    V_WORKCENTER_ID,
    V_SI_NUMBER,
    V_MFG_SCHED_FACILITY_ID,
    V_MFG_FACILITY_ID,
    V_PILOT_NAME,
    V_ENG_HOLD_FLAG,
    V_SHORT_FLAG,
    V_OVR_SHORTAGE,
    V_USER_HOLD_FLAG,
    V_SHIP_TO_ADDRESS_SEQ_NUM,
    V_CALICO_REF_NUM,
    V_CONFIG_ID,
    V_TOTAL_UNITS_QTY,
    V_ORDER_TYPE,
    V_SKU#,
    V_SUB_ASSEMBLY_NUMBER,
    V_BASE_ASM_FLAG,
    V_QTY_REQ,
    V_ORIGINAL_PART_NUMBER,
    V_SUBSTITUTE_PART_NUMBER,
    V_QTY_EXTENDED,
    V_ISSUE_CODE,
    V_ORIG_PART_DESC,
    V_ORIG_COMMODITY_CODE,
    V_ORIG_PRINT_ON_TRAVELER_FLAG,
    V_ORIG_BOX_CODE,
    V_SUBST_PART_DESC,
    V_SUBST_COMMODITY_CODE,
    V_SUBST_PRINT_ON_TRAVELER_FLAG,
    V_SUBST_BOX_CODE
    FROM TABLE(XMLSEQUENCE(EXTRACT(P_PODETAILS_XML, '/LineItems/LineItem'))) T
    but getting performace problem. I'm able to insert 100 lines items in 3 sec but requirement is further less.
    Any help..... ????
    thanks in adavance..

    hi..
    me too having same type of XML data to be inserted into oracle table
    i've to write procedure for this
    can u help me plz.....

  • XML data insert into Oracle

    Hi all,
    I have some xml data which i would like to insert into oracle tables.
    Where to start up with this?

    Hi,
    Here's another good place to start: [XML DB FAQ|http://forums.oracle.com/forums/thread.jspa?threadID=410714&tstart=0]
    You seem to be especially interested in second post in there.
    Regards
    Peter

  • Unable to insert large blob data into DB

    Hi,
    I have written a piece of code which serializes a java object and writes it into a blob in DB.
    It works pretty fine for small objects of around 3 to 4 KB size, but I start getting trouble with larger objects.
    Here's my piece of code -
    private final static String QUERY_INSERT_AUDIT_DATA = "INSERT INTO " +
    "KAAS_AUDIT_DATA(object_id, object_type_cd, create_by, summary_data) VALUES (?, ?, ?, ?)";
    byte [] byteArray;
    bos = new ByteArrayOutputStream();
    oos = new ObjectOutputStream(bos);
    oos.writeObject(summaryData);
    oos.flush();
    oos.close();
    byteArray = bos.toByteArray();
    bos.close();
    ByteArrayInputStream bais = new ByteArrayInputStream(byteArray);
    BufferedInputStream buffInputSteam = new BufferedInputStream(bais);
    trace("addAuditSummary() : byteArray " + byteArray.length);
    trace("addAuditSummary() : buffInputSteam.available " + buffInputSteam.available());
    trace("addAuditSummary() : Calling Query to populating data");
    statement = conn.prepareStatement(QUERY_INSERT_AUDIT_DATA);
    statement.setString(1, objectId.toUpperCase());
    statement.setInt(2, objectType);
    statement.setString(3, createdBy);
    statement.setBinaryStream(4, buffInputSteam, buffInputSteam.available());
    statement.executeUpdate();
    statement.close();
    Basically, I am converting the object to BufferedInputStream to sent it to the BLOB(summary_data).
    The error I get is -
    ][30 Nov 2007 10:38:08] [ERROR] [com.hns.iag.kaas.util.debug.DebugDAO] addAuditSummary() : SQL exception occured while adding audit summary data for Object: BUSINESS_SO_BASE_DEAL
    ]java.sql.SQLException: Io exception: Connection reset by peer.
    at oracle.jdbc.dbaccess.DBError.throwSqlException(Ljava/lang/String;Ljava/lang/String;I)V(DBError.java:134)
    at oracle.jdbc.dbaccess.DBError.throwSqlException(ILjava/lang/Object;)V(DBError.java:179)
    at oracle.jdbc.dbaccess.DBError.throwSqlException(Ljava/io/IOException;)V(DBError.java:334)
    at oracle.jdbc.ttc7.TTC7Protocol.handleIOException(Ljava/io/IOException;)V(TTC7Protocol.java:3675)
    at oracle.jdbc.ttc7.TTC7Protocol.doOall7(BBI[B[Loracle/jdbc/dbaccess/DBType;[Loracle/jdbc/dbaccess/DBData;I[Loracle/jdbc/dbaccess/DBType;[Loracle/jdbc/dbaccess/DBData;I)V(Optimized Method)
    at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(Loracle/jdbc/dbaccess/DBStatement;B[BLoracle/jdbc/dbaccess/DBDataSet;ILoracle/jdbc/dbaccess/DBDataSet;I)I(TTC7Protocol.java:1141)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout()V(Optimized Method)
    at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate()I(Optimized Method)
    at weblogic.jdbc.wrapper.PreparedStatement.executeUpdate()I(PreparedStatement.java:94)
    at com.hns.iag.kaas.util.debug.DebugDAO.addAuditSummary(Ljava/lang/String;ILjava/lang/Object;Ljava/lang/String;)V(DebugDAO.java:794)
    at com.hns.iag.kaas.servlets.sdm.action.SummaryAction.perform(Lcom/hns/iag/kaas/servlets/sdm/core/Event;Lcom/hns/iag/kaas/servlets/sdm/core/UserContext;)Ljava/lang/String;(SummaryAction.java:246)
    at com.hns.iag.kaas.servlets.sdm.SDMControllerServlet.process(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V(SDMControllerServlet.java:213)
    at com.hns.iag.kaas.servlets.sdm.SDMControllerServlet.doPost(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V(SDMControllerServlet.java:128)
    at javax.servlet.http.HttpServlet.service(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V(HttpServlet.java:760)
    at javax.servlet.http.HttpServlet.service(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V(HttpServlet.java:853)
    at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run()Ljava/lang/Object;(ServletStubImpl.java:971)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Lweblogic/servlet/internal/FilterChainImpl;)V(ServletStubImpl.java:402)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V(ServletStubImpl.java:305)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run()Ljava/lang/Object;(WebAppServletContext.java:6354)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Lweblogic/security/subject/AbstractSubject;Ljava/security/PrivilegedAction;)Ljava/lang/Object;(AuthenticatedSubject.java:317)
    at weblogic.security.service.SecurityManager.runAs(Lweblogic/security/acl/internal/AuthenticatedSubject;Lweblogic/security/acl/internal/AuthenticatedSubject;Ljava/security/PrivilegedAction;)Ljava/lang/Object;(SecurityManager.java:118)
    at weblogic.servlet.internal.WebAppServletContext.invokeServlet(Lweblogic/servlet/internal/ServletRequestImpl;Lweblogic/servlet/internal/ServletResponseImpl;)V(WebAppServletContext.java:3635)
    at weblogic.servlet.internal.ServletRequestImpl.execute(Lweblogic/kernel/ExecuteThread;)V(ServletRequestImpl.java:2585)
    at weblogic.kernel.ExecuteThread.execute(Lweblogic/kernel/ExecuteRequest;)V(ExecuteThread.java:197)
    at weblogic.kernel.ExecuteThread.run()V(ExecuteThread.java:170)
    at java.lang.Thread.startThreadFromVM(Ljava/lang/Thread;)V(Unknown Source)
    I would really appreciate any help.
    Thanks
    Saurabh                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              

    I would say, most likele BufferedInputStream.available() returns an incorrect length. available() does not return the length of the InputStream. See the javadocs for the details
    Additionally: it doesn't make sense at all to wrap the ByteArrayInputStream with a BufferedInputStream, the array is in memory already, so there is no need to buffer the read access to it (you are simply adding more overhead).
    Remove the BufferedInputStream (passing the bais directly to the setBinaryStream() method) and use byteArray.length to indicate the length of the data

  • Insert into date column using EJB3.0 and toplink not working

    Hi All,
    I'm getting the following error whenever I attempt to insert a date value into my Oracle database.
    [TopLink Fine]: 2006.08.08 05:53:21.973--UnitOfWork(14806807)--Connection(14714759)--Thread(Thread[RMICallHand
    ler-0,5,RequestThreadGroup])--
    INSERT INTO EMP (EMPNO, ENAME, SAL, HIRE_DATE) VALUES (156, 'John', 2.0, {ts '2006-08-08 17:53:21.973'})
    [TopLink Warning]: 2006.08.08 05:53:22.036--UnitOfWork(14806807)--Thread(Thread[RMICallHandler-0,5,RequestThreadGroup])--
    Exception [TOPLINK-4002] (Oracle TopLink - 10g Release 3 (10.1.3.0.0) (Build 060118)):
    oracle.toplink.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: ORA-00904: invalid column name
    The cause seems to be clear enough; from the sql above it seems that the timestamp syntax isn't being interpreted properly by either toplink or the JDBC driver , (I'm using whatever driver that comes with OC4J 10.1.3).
    I've seen somewhere that you can call setUseNativeSQL() in toplink but how do I get hold of the toplink session from an entity bean?
    That sounds like an awkward workaround anyway, what other workarounds are open to us?
    Thanks,
    C

    C,
    I don't use TopLink, but I suggest you set the "processEscapes" [Oracle database connection] property to "true", as described in the JDBC User's Guide and Reference.
    Oracle documentation can be accessed from here:
    http://www.oracle.com/technology/documentation/index.html
    Good Luck,
    Avi.

  • ORA-01403: no data found error hile inserting into a table

    Hi,
    I am populating a PL/SQL table(Array) with the data. From that array inserting into a Actual table. Before inserting am checking array count. Array count is greater than 0. But I am getting "ORA-01403: no data found" exception. I am not getting why this error is displaying.
    Please someone help me. Below is the code.
    CREATE OR REPLACE PROCEDURE XXDL_TEST_INSERT
    IS
    BEGIN
       IF  t_array.count> 0 THEN
        FND_FILE.PUT_LINE (FND_FILE.LOG, t_array.count);
        FOR i IN t_array.FIRST..t_array.LAST
        LOOP
            INSERT INTO XXDL_TEST
            VALUES(t_array(i).name )
      END LOOP;
    END IF;
    EXCEPTION
      WHEN OTHERS THEN
        FND_FILE.PUT_LINE (FND_FILE.LOG,SQLERRM);
    END;Thanks
    Alaka

    It looks like your Array is sparsely populated:
    SQL> DECLARE
      2    TYPE l_tab_type IS TABLE OF VARCHAR2(10)
      3      INDEX BY BINARY_INTEGER;
      4    l_tab l_tab_type;
      5  BEGIN
      6    l_tab(1) := 'A';
      7    l_tab(2) := 'B';
      8    l_tab(3) := 'C';
      9    FOR i IN l_tab.FIRST .. l_tab.LAST LOOP
    10      dbms_output.put_line(l_tab(i));
    11    END LOOP;
    12  END;
    13  /
    A
    B
    C
    PL/SQL procedure successfully completed.
    SQL>
    SQL> DECLARE
      2    TYPE l_tab_type IS TABLE OF VARCHAR2(10)
      3      INDEX BY BINARY_INTEGER;
      4    l_tab l_tab_type;
      5  BEGIN
      6    l_tab(1) := 'A';
      7    l_tab(3) := 'B';
      8    l_tab(4) := 'C';
      9    FOR i IN l_tab.FIRST .. l_tab.LAST LOOP
    10      dbms_output.put_line(l_tab(i));
    11    END LOOP;
    12  END;
    13  /
    A
    DECLARE
    ERROR at line 1:
    ORA-01403: no data found
    ORA-06512: at line 10Edited by: JS1 on Apr 11, 2009 8:59 AM
    You should also be using the FORALL syntax with INDICES OF. Check out The Docs

Maybe you are looking for

  • HELP PLEASEE!

    When i try to update my IPod it says- "Songs on the IPod cannot be updated becuase all of the playlists selected for updating no longer exist" but all my music is still in my Itunes and in my Playlist but not on my IPod?????? Please help.. thanks!

  • What is the smartest way for me to upgrade/update my system?

    I am a busy professional photographer working with a iMac G4 Flat Panel 15" running OS 10.2. I work mostly with Photoshop 7.0.1 and Canon Utilities EOS Viewer Utility version 1.2.1.14. I shoot with a Canon EOS 20D. I print proofs with an Epson 1280.

  • Having problems in creating a class with name File.

    I want to compile a new class with class name as File, i have made it part of a new package also but still i am getting this error "File.java:2: CustomFile.File is already defined in this compilation unit import java.io.File; ^ File.java:6: cannot re

  • Lots of ipod problems

    Hi this is my first post...i recently got a new 30GB Black iPod. A few days after i got it i started having all kinds of problems. I was trying to watch a movie and then none of the buttons would work. I reset my iPod and then got the sad faced icon.

  • Password Protected Excel Sheet

    Hi all, Please specify how to save Password Protected Excel Sheet using SAP. Thanks and Regards, Surya.