Inserting data from  a table  to an XML file

I want to insert the values from this xml file emp.xml into a table Employees :
<EMPLOYEES>
<EMP>
<EMPNO>7369</EMPNO>
<ENAME>SMITH</ENAME>
<JOB>CLERK</JOB>
<HIREDATE>17-DEC-80</HIREDATE>
<SAL>800</SAL>
</EMP>
<EMP>
<EMPNO>7499</EMPNO>
<ENAME>ALLEN</ENAME>
<JOB>SALESMAN</JOB>
<HIREDATE>20-FEB-81</HIREDATE>
<SAL>1600</SAL>
<COMM>300</COMM>
</EMP>
<EMP>
</EMPLOYEES>
and here is my Employee table in Oracle 9i database
SQL> DESC EMPLOYEE;
Name Null? Type
EMPNO NUMBER
EMPNAME VARCHAR2(10)
JOB VARCHAR2(10)
HIREDATE DATE
SAL NUMBER
After getting help from the members i was able to do the insert of data from the xml file to the table..how to do the insert of data from the table to the xml file.
Regards,
Renu

Hello michaels , thank you for the solution, still i am having some problems
Here is what i have done :
1.
SQL> CREATE DIRECTORY my_table_dir AS 'E:\table_files'
2 ;
Directory created.
2.
SQL> select * from myemp;
ENAME
SMITH
ALLEN
3.
This is the content of the existing xml file saved in the directory E:\table_files as emp.xml
<EMPLOYEES>
<EMP>JIM</EMP>
<EMP>RICK</EMP>
</EMPLOYEES>
4.
Now i executed this code :
declare
emp_xml xmltype;
begin
select sys_xmlagg (column_value, sys.xmlformat ('EMPLOYEES')) emp_xml
into emp_xml
from table (xmlsequence (cursor (select *
from myemp
where ename in ('SMITH', 'ALLEN')),
sys.xmlformat ('EMP')
dbms_xslprocessor.clob2file (emp_xml.getclobval (), 'E:\table_files', 'emp.xml');
end;
And the Error i got is :
declare
ERROR at line 1:
ORA-29280: invalid directory path
ORA-06512: at "SYS.UTL_FILE", line 18
ORA-06512: at "SYS.UTL_FILE", line 424
ORA-06512: at "XDB.DBMS_XSLPROCESSOR", line 46
ORA-06512: at line 12

Similar Messages

  • Exporting data from database tables to a XML file

    Hi,
    We want to export data from Oracle database tables to an XML
    file. What tool can we use for this purpose, and how do we go
    about it ?
    Can we extract data only from an Oracle8 database, or can we
    extract data from Oracle7.3 databases too ?
    Any help in this regard would be appreciated.
    Thanks
    Dipanjan
    null

    Dipanjan (guest) wrote:
    : Hi,
    : We want to export data from Oracle database tables to an XML
    : file. What tool can we use for this purpose, and how do we go
    : about it ?
    : Can we extract data only from an Oracle8 database, or can we
    : extract data from Oracle7.3 databases too ?
    : Any help in this regard would be appreciated.
    : Thanks
    : Dipanjan
    Start by downloading the XML SQL Utility and make sure you have
    the approriate JDBC 1.1 drivers installed for your database.
    There are samples which will get you going included in the
    archive.
    Oracle XML Team
    http://technet.oracle.com
    Oracle Technology Network
    null

  • ABAP program to output data from SAP table to an XML format file?

    hello ABAP experts,
    Does anyone know how to output data from SAP table to an XML format file?  Would be appreciated if someone show the detailed sample codes and we will give you reward points!
    Thanks!

    Edited by: Jose Hugo De la cruz on Aug 19, 2009 8:23 PM

  • Import/export data from ms sql 7 to xml file in a particular xpdl format

    I'm trying to write java program to import/export data from ms sql 7 to xml file in a particular xpdl format. Can anyone suggest how to do it?

    take a glance at what these guys do: http://www.openbusinessengine.org/docs/guide.html

  • Insert data from a table

    <p style="margin-top: 0; margin-bottom: 0"><font face="Arial" size="2">Hi,</font></p>
    <p style="margin-top: 0; margin-bottom: 0"> </p>
    <p style="margin-top: 0; margin-bottom: 0"><font face="Arial" size="2">I would
    like to insert data in a table. The data are selected by a query. I wrote this
    code but there is an error :</font></p>
    <p style="margin-top: 0; margin-bottom: 0"> </p>
    <font SIZE="2">
    <p style="margin-top: 0; margin-bottom: 0"></font><font face="Courier New">
    <font SIZE="2" COLOR="#0000f0">PROCEDURE</font><font SIZE="2"> </font>
    <font SIZE="2" COLOR="#808000">GLMASTER_SAVE</font><font SIZE="2"> </font>
    </font><font SIZE="2" COLOR="#0000f0"><font face="Courier New">IS</font></p>
    </font><font SIZE="2">
    <p style="margin-top: 0; margin-bottom: 0"></font>
    <font SIZE="2" COLOR="#0000f0" face="Courier New">BEGIN</p>
    </font>
    <p style="margin-top: 0; margin-bottom: 0"><font face="Courier New">
    <font SIZE="2" COLOR="#0000f0">  INSERT</font><font SIZE="2"> </font>
    <font SIZE="2" COLOR="#0000f0">INTO</font><font SIZE="2"> </font></font>
    <font SIZE="2" COLOR="#808000"><font face="Courier New">GLMASTER_SAVE</font></p>
    </font>
    <p style="margin-top: 0; margin-bottom: 0">
    <font SIZE="2" COLOR="#0000f0" face="Courier New"> </font><font SIZE="2" COLOR="#0000f0" face="Courier New">
    </font><font SIZE="2" COLOR="#0000f0" face="Courier New"> </font><font SIZE="2" COLOR="#0000f0" face="Courier New">
    </font><font face="Courier New"><font SIZE="2" COLOR="#0000f0">(</font><font SIZE="2">COMPANY</font><font SIZE="2" COLOR="#0000f0">,</font><font SIZE="2">
    ACCT_UNIT</font><font SIZE="2" COLOR="#0000f0">,</font><font SIZE="2"> ACCOUNT</font><font SIZE="2" COLOR="#0000f0">,</font><font SIZE="2">
    SUB_ACCOUNT</font><font SIZE="2" COLOR="#0000f0">,</font><font SIZE="2">
    ACTIVE_STATUS</font></font><font SIZE="2" COLOR="#0000f0"><font face="Courier New">)</font></p>
    </font><font SIZE="2">
    <p style="margin-top: 0; margin-bottom: 0"></font>
    <font SIZE="2" COLOR="#0000f0" face="Courier New"> </font><font SIZE="2" COLOR="#0000f0" face="Courier New">
    VALUES</p>
    </font><font SIZE="2">
    <p style="margin-top: 0; margin-bottom: 0"></font>
    <font SIZE="2" COLOR="#0000f0" face="Courier New"> </font><font SIZE="2" COLOR="#0000f0" face="Courier New">
    </font><font SIZE="2" COLOR="#0000f0" face="Courier New"> </font><font SIZE="2" COLOR="#0000f0" face="Courier New">
    </font><font face="Courier New"><font SIZE="2" COLOR="#0000f0">(SELECT</font><font SIZE="2">
    </font><font SIZE="2">COMPANY</font><font SIZE="2" COLOR="#0000f0">,</font><font SIZE="2">
    </font><font SIZE="2">ACCT_UNIT</font><font SIZE="2" COLOR="#0000f0">,</font><font SIZE="2">
    </font><font SIZE="2">ACCOUNT</font></font><font SIZE="2" COLOR="#0000f0"><font face="Courier New">,</font></font><font SIZE="2"><font SIZE="2" COLOR="#0000f0" face="Courier New">
    </font></font><font face="Courier New"><font SIZE="2">SUB_ACCOUNT</font><font SIZE="2" COLOR="#0000f0">,</font><font SIZE="2">
    </font></font><font SIZE="2"><font face="Courier New">ACTIVE_STATUS</font></p>
    <p style="margin-top: 0; margin-bottom: 0">
    <font SIZE="2" COLOR="#0000f0" face="Courier New"> </font><font SIZE="2" COLOR="#0000f0" face="Courier New">
    </font><font SIZE="2" COLOR="#0000f0" face="Courier New"> </font><font SIZE="2" COLOR="#0000f0" face="Courier New">
    </font><font SIZE="2" COLOR="#0000f0" face="Courier New"> </font><font SIZE="2" COLOR="#0000f0" face="Courier New">
    </font><font SIZE="2" COLOR="#0000f0" face="Courier New"> </font></font><font face="Courier New"><font SIZE="2" COLOR="#0000f0">FROM</font><font SIZE="2">
    </font></font><font SIZE="2"><font face="Courier New">GLMASTER</font></p>
    <p style="margin-top: 0; margin-bottom: 0">
    <font SIZE="2" COLOR="#0000f0" face="Courier New"> </font><font SIZE="2" COLOR="#0000f0" face="Courier New">
    </font><font SIZE="2" COLOR="#0000f0" face="Courier New"> </font></font><font face="Courier New"><font SIZE="2" COLOR="#0000f0">ORDER</font><font SIZE="2">
    </font><font SIZE="2" COLOR="#0000f0">BY</font><font SIZE="2"> </font>
    <font SIZE="2">COMPANY</font><font SIZE="2" COLOR="#0000f0">,</font><font SIZE="2">
    </font><font SIZE="2">ACCT_UNIT</font><font SIZE="2" COLOR="#0000f0">,</font><font SIZE="2">
    </font><font SIZE="2">ACCOUNT</font><font SIZE="2" COLOR="#0000f0">,</font><font SIZE="2">
    </font><font SIZE="2">SUB_ACCOUNT</font></font><font SIZE="2" COLOR="#0000f0"><font face="Courier New">);</font></p>
    </font><font SIZE="2">
    <p style="margin-top: 0; margin-bottom: 0">
    <font SIZE="2" COLOR="#0000f0" face="Courier New"> </font><font SIZE="2" COLOR="#0000f0" face="Courier New">
    </font></font><font SIZE="2" COLOR="#0000f0" face="Courier New">COMMIT;</p>
    </font><font SIZE="2">
    <p style="margin-top: 0; margin-bottom: 0"></font>
    <font SIZE="2" COLOR="#0000f0" face="Courier New">END;</p>
    </font>
    <p style="margin-top: 0; margin-bottom: 0"> </p>
    <p style="margin-top: 0; margin-bottom: 0"><font face="Arial" size="2">Do you
    know why ?</font></p>
    <p style="margin-top: 0; margin-bottom: 0"> </p>
    <p style="margin-top: 0; margin-bottom: 0"><font face="Arial" size="2">Thank you
    for your help.</font></p>
    <p style="margin-top: 0; margin-bottom: 0"> </p>
    <p style="margin-top: 0; margin-bottom: 0">
    <font color="#008080" face="Arial" size="2"><i><b>Patrick</b></i></font></p>

    try this:
      INSERT INTO GLMASTER_SAVE
        (COMPANY, ACCT_UNIT, ACCOUNT, SUB_ACCOUNT, ACTIVE_STATUS)
      SELECT COMPANY, ACCT_UNIT, ACCOUNT, SUB_ACCOUNT, ACTIVE_STATUS
           FROM GLMASTER
       ORDER BY COMPANY, ACCT_UNIT, ACCOUNT, SUB_ACCOUNT;you need not to include the VALUES
    Message was edited by:
    Warren Tolentino
    sorry ps while posting this you had already posted your solution.

  • Simple way to insert data from one table

    Hi,
    I need to know a simple way on how to transfer the data from one table to another....
    First table xx_inv_tab1 has three columns col1, col2, col3 and where as second table xx_inv_tab2 has five columns col1, col2, col3, col4, col5.
    Here col2, col3, col4 are the same columns as in table1 xx_inv_tab1...
    Now I want to transfer first table data in to second table .... first column of second table holds a sequence, followed by the first table three columns data and followed with col4 and col5 which will hold NULL values....
    In my scenario, I have 70 - 75 columns in my first table which I want to move to second table which three new columns (one is sequence and other two has null values)...
    Any ideas if we make it in a simplest way rather saying insert into xx_inv_tab2 (col1, col2, col3 ............................................. col75) values (seq, col1, col2..........................col75, null, null)
    Help Appreciated..
    Thanks

    Easy
    untested
    insert into xx_inv_tab2 t2 (col1,col2,col3,col4)
    select yourSequence.nextval, t1.col1, t1.col2, t1.col3
    from xx_inv_tab1 t1
    ;Note that col5 does not need to be used, since you want to fill it with NULL.
    USe excel or sql developer to write you a list of column names, if you are to lazy to write all 75 columns by yourself.
    What might also work:
    untested
    insert into xx_inv_tab2 t2
    select yourSequence.nextval, t1.*, null
    from xx_inv_tab1 t1
    ;Edited by: Sven W. on Aug 31, 2012 4:41 PM

  • [ECC6] Inserting data from internal table (deep structure) into db table

    Hi experts,
    I have a problem when inserting data from IT using deep structure into a database table. Please help:
    I have one database table with 2 columns ZTest (col1, col2). Col1 is key.
    In my program I have a deep structure t_screen using table type lvc_t_scol:
    In 4.6c systems, the INSERT statement works well but it does not work in ECC6 systems.
    DATA: BEGIN OF t_screen OCCURS 0,
            rec_count(3) TYPE n,
            col1 LIKE ZTest-col1,
            col2 LIKE ZTest-col2.
    DATA: ct TYPE lvc_t_scol.
    DATA: END   OF t_screen.
    t_screen-col1 = 'test1'.
    t_screen-col2 = 'test1'.
    APPEND t_screen.
    t_screen-col1 = 'test2'.
    t_screen-col2 = 'test2'.
    APPEND t_screen.
    INSERT ZTest FROM TABLE t_screen ACCEPTING DUPLICATE KEYS.
    Currently I have an idea using a temporary internal table with the same structure as ZTest. Use MOVE-CORRESPONDING statement to move data from t_screen table to temporary table before inserting --> It worked. But do you have any ideas without using temporary table?

    Hi
    There are a large number of stataments couldn't be supported in unicode system and so it doesn't allow to do it in ECC 6.
    U need to delete the deep structure from your defination:
    DATA: BEGIN OF t_screen OCCURS 0,
            rec_count(3) TYPE n,
            col1 LIKE ZTest-col1,
            col2 LIKE ZTest-col2.
    DATA: ct TYPE lvc_t_scol. "<-------- Error is here
    DATA: END   OF t_screen.
    So u need to use a structure like this to update your table:
    DATA: BEGIN OF T_ZTEST OCCURS 0,
            rec_count(3) TYPE n,
            col1 LIKE ZTest-col1,
            col2 LIKE ZTest-col2.
    DATA: END   OFT_ZTEST.
    Max

  • Inserting data from one table into another table using PL/SQL

    HI,
    I am trying to insert values from one table into another using PL procedure, the values I want to retrieve from the table riverside1 are charac_id and charac_type and insert these values into another table called riverside2 , the stored procedure zorgs_gorfs(x,y) accepts two parameters which are 2 charac_id's of d characters in riverside1 then using insert statements inserts these characters from riverside1 into riverside2.
    CREATE OR REPLACE PROCEDURE zorgs_gorfs(x IN NUMBER, y IN NUMBER) AS
         BEGIN
              INSERT INTO riverside2
                   (charac_id)
              VALUES
                   (x);
    INSERT INTO riverside2
                   (charac_id)
              VALUES
                   (y);
          END zorgs_gorfs;
    /This works but the problem im having is that when I also try to insert the charac_type as well as the charac_id it doesnt work below is the code:
    CREATE OR REPLACE PROCEDURE zorgs_gorfs(x IN NUMBER, y IN NUMBER) AS
         BEGIN
              INSERT INTO riverside2
                   (charac_id,charac_tye)
              VALUES
                   (Select
                        charac_id,
                        charc_type
                   FROM
                        riverside1
                   WHERE
                        charac_id = x);
          END zorgs_gorfs;
    /can someone kindly sort me out

    modify this sql
    INSERT INTO riverside2
                   (charac_id,charac_tye)
              VALUES
                   (Select
                        charac_id,
                        charc_type
                   FROM
                        riverside1
                   WHERE
                        charac_id = x);as
    INSERT INTO riverside2
                   (charac_id,charac_tye)
              VALUES
                   (Select
                        charac_id,
                        charc_type
                   FROM
                        riverside1
                   WHERE
                        charac_id in ( x,y));But my suggestion would be consider revising your approach. It does not look that good.
    Thanks,
    karthick.

  • Inserting Data from one table to another.

    I running a procedure that loops through a cursor which is about 80,000 records(tableA) and I am trying to insert into another table(tableX) based on the data from tableA. I have error trapped the hell out of this and made sure I am covering any holes. When looping through the cursor, it insert only about 28,000 records and then exits the loop. I have debugged this problem 100 different ways and for the life of me I can not figure why it just craps out at about this many records. I actually located where the looping stops and took the next 5 records from tableA, and inserted them manually and they went through normally, which tells me that there should have been no reason why the executable statements exited the loop. I checked my space and I have more than enough. I have debugged the code many different ways, but still no luck. It always exits the procedure after inserting about 28,000 records. When I was debugging the code, I noticed that it would exit because one of my select into...statements was returning a NO_DATA_FOUND error, but I trapped that error, and assigned a value to that variable if it was null.
    I am really getting frustrated with this. Can anyone offer some suggestions or advice as to what I can do to acheive my goal?

    post the cursor , loop , definition.
    while you fire the cursor, on table A for
    insert in table X, what happens on A and X ?
    it tries to make a commit every 100/1000 time,
    until close the cursor.
    table definition X, is similar to A ?
    alert_$SID.log what says ?
    pasquale rago

  • Inserting data from one table to another in different format

    Hello,
    I would like to know what I am doing wrong with the following code when I write a data from one another to another table in a different format. I am now learning PL/SQL and am using this as
    a test problem.
    I have a table called students which has the following columns:
    SQL> desc student
    Name Null? Type
    ----------- ----------------STUDENT_ID NUMBER(10)
    COURSE VARCHAR2(10)
    CREDITS NUMBER(10)
    I have created another table called new_student which has the following structure:
    SQL> desc new_student
    Name Null? Type
    ----------------------------------------- -------- ------------- STUDENT_ID NUMBER(10)
    COURSE VARCHAR2(30)
    CREDITS VARCHAR2(10)
    The data in the student table is:
    SQL> select * from student;
    STUDENT_ID COURSE CREDITS
    1 Science 4
    1 History 3
    2 Science 4
    2 History 3
    2 Math 4
    3 Sociology 3
    3 Psycology 3
    I want to store the STUDENT table data in NEW_STUDENT table as:
    STUDENT ID COURSES CREDITS
    1 Science/History 4/3
    2 Science/History/Math 4/3/4
    3 Sociology/Psycology 3/3
    This is my code:
    DECLARE
    -- Get all the student IDs
    CURSOR studentlist_cursor IS select distinct student_id from student ORDER BY student_id;
    -- Get the information for each student ID
    CURSOR courses_cursor(nstudentid number) is select course, credits from student where student_id=nstudentid;
    nIndex     INTEGER;
    pltcourses     DBMS_SQL.VARCHAR2_TABLE;
    pltcredits     DBMS_SQL.NUMBER_TABLE;
    newcourses varchar2(50);
    newcredits varchar2(10);
    BEGIN
    FOR student_rec IN studentlist_cursor
    LOOP
    nIndex:=0;
    -- Loop through each student ID from student_rec to get the
    --courses and creditsstudent ID
    FOR courses_rec in courses_cursor(student_rec.student_id)
         LOOP
         nIndex:=nIndex+1;
         pltcourses(nIndex):=courses_rec.course;
    -- Store the course data for each student ID in newcourses
    -- while doing so check if it is null or put a '/' between each course
    loop
    if newcourses is null then
    newcourses:=pltcourses(nIndex);
    else
    newcourses:=newcourses||'/'||pltcourses(nIndex);
    end if;
    end loop;
         pltcredits(nIndex):=courses_rec.credits;
    --Store credits data in variable newcredits
    --If the newcredits is not null then put a '/' between each credits
    loop
    if newcredits is null then
    newcredits:=pltcredits(nIndex);
    else
    newcredits:=newcredits||'/'||pltcredits(nIndex);
    end if;
    end loop;
    -- Insert student id, newcourses, newcredits into NEW_STUDENT
    INSERT INTO NEW_STUDENT
    (student_id ,
    course,
    credits
    ) VALUES
    (student_rec.student_id,
    newcourses,
    newcredits
    COMMIT;
    -- come out of the student id record and go to the next student --id record
    END LOOP;
    -- come out of the loop
    END LOOP;
    END;
    While doing so I get an error message:
    declare
    ERROR at line 1:
    ORA-06502: PL/SQL: numeric or value error
    ORA-06512: at line 23.
    The error is at the line:
    newcourses:=newcourses||'/'||pltcourses(nIndex);
    Can anyone help me by pointing out where the mistake is?
    Thank you for reading this long mail.
    Thank you.
    Rama.

    Hi dude
    there is lot of error in ur pl/sql.
    and u have created table new_student with columns
    student_id number(10),
    courses varchar2(30),
    credits number(10).
    first u need to modify ur table.
    student_id number(10),
    courses varchar2(30),
    credits varchar2(10).
    Now i am writing whole pl/sql block for u. it will work fine.
    DECLARE
    CURSOR studentlist_cursor IS select distinct student_id from student ORDER BY student_id;
    CURSOR courses_cursor(nstudentid number) is select course, credits from student
    where student_id = nstudentid;
    nIndex INTEGER;
    pltcourses DBMS_SQL.VARCHAR2_TABLE;
    pltcredits DBMS_SQL.NUMBER_TABLE;
    newcourses varchar2(50);
    newcredits varchar2(10);
    BEGIN
    FOR student_rec IN studentlist_cursor
    LOOP
    nIndex:=0;
    newcourses := null;
    newcredits := null;
    FOR courses_rec in courses_cursor(student_rec.student_id)
    LOOP
    nIndex:=nIndex+1;
    pltcourses(nIndex):=courses_rec.course;
    if newcourses is null then
    newcourses:=pltcourses(nIndex);
    else
    newcourses:=newcourses||'/'||pltcourses(nIndex);
    end if;
    pltcredits(nIndex):=courses_rec.credits;
    if newcredits is null then
    newcredits:=pltcredits(nIndex);
    else
    newcredits:=newcredits||'/'||pltcredits(nIndex);
    end if;
    end loop;
    INSERT INTO NEW_STUDENT
    (student_id,
    course) VALUES
    (student_rec.student_id,
    newcourses);
    END LOOP;
    END;
    and please revert back
    Regards
    Anil

  • Inserting data from one table to another table....

    Hi DB Gurus,
    I have two table like table A in instance X and table B in instance Y. I want to insert data into table A from table B.If data in table B already exist in table A then that should not insert .if data In table B is not present in table A then that data should insert into table A.
    please help me to how insert this kind of data.I am trying to insert data by using "insert into" statement.Is it correct way or not. please let me know...
    Thanks in advance
    Best regards
    kumar

    Hey There,
    "I have two table like table A in instance X and table B in instance Y"
    Are these 2 instances sitting in the same db/rac.
    if so
    insert into x.a
    select * from y.b
    If the 2 instances are in different databases/racs then i think you can add a linked db into your script.- not 100% about that though.
    Dob

  • Insert data from one table to another.

    I have two tables - T1 & T2.
    T1 has columns A1,A2,A3,A4 (A1 & A2 are the primary keys)
    T2 has columns B1,B2,B3,B4 (B1 & B2 are the primary keys)
    I need to insert records from T1 to T2 with the conditions,
    - A1,A2,A3 will have the same record for the multiple records of A4.
    This is what I tried and got the error:-
    SQL> INSERT INTO nego_prop_supp (nps_supp_cd, nps_enq_no, nps_supp_resp, nps_cs_rank)
    2 SELECT DISTINCT tos_supp_code, tos_enq_no, tos_bid_seal_condn, csr_set_rank
    3 FROM tender_opening_supp, cs_rate
    4 WHERE tos_enq_no = '7211233E' AND
    5 tos_supp_code = csr_scd AND
    6 (tos_nature_of_bid = 'P' or tos_nature_of_bid = 'N') AND
    7 csr_set_rank IS NOT NULL;
    INSERT INTO nego_prop_supp (nps_supp_cd, nps_enq_no, nps_supp_resp, nps_cs_rank)
    ERROR at line 1:
    ORA-00001: unique constraint (DPURC.NEGO_PROP_SUPP_PK) violated
    You could understand that T1 consists (data from 'tender_opening_supp' & cs_rate), while T2 is nego_prop_supp.
    Pls. get me the soution for thi problem!!

    then this query
    SELECT DISTINCT tos_supp_code, tos_enq_no, tos_bid_seal_condn, csr_set_rank
    3 FROM tender_opening_supp, cs_rate
    4 WHERE tos_enq_no = '7211233E' AND
    5 tos_supp_code = csr_scd AND
    6 (tos_nature_of_bid = 'P' or tos_nature_of_bid = 'N') AND
    7 csr_set_rank IS NOT NULL
    8 and not exists (select nps_supp_cd from nego_prop_supp,tender_opening_supp where tos_supp_code
    = nps_supp_cd) ;
    have more than one tos_supp_code (the same any times) with any different value from tos_enq_no, tos_bid_seal_condn, csr_set_rank
    then anything is wrong or your key(on nego_prop_supp ) or the query retrieve rows that you not want
    the join is ok?
    why this join retrieve more than one value with the key of the other table? Do you need to filter any more? are you missing a filter?

  • Insert data from a table into 5 different tables

    My application has a data block than display information from another table. From this data block, the user has the option to select the records for upload. The information in the data block is used to insert data into 5 different tables. So if any exception occurs while inserting, the whole process should be rollback, but before this happen a record is inserting in a failed table indicated the reason of the failed.
    For this process I use the following commands:
    1.     sp_name := Get_Application_Property(SAVEPOINT_NAME);
    2.     INSERT DDL
    3.     INSERT DDL
    4.     INSERT DDL
    5.     INSERT DDL
    6.     INSERT DDL
    7.     If Other Exception then ISSUE_ROLLBACK(sp_name) Otherwise FORMS_DDL ('commit')
    The problem the previous insert(s) rollback
    Thanks,

    Hi,
    If you are using FORMS_DDL built-in to insert the data, then after each FORMS_DDL statement, you have to check the values of FORM_SUCCESS or FORM_FAILURE built-ins.
    FORMS_DDL('<insert_statement_1>');
    IF FORM_FAILURE THEN
    <the statement fails. so have to be rollbacked>
    END IF;
    FORMS_DDL('<insert_statement_2>');
    IF FORM_FAILURE THEN
    <the statement fails. so have to be rollbacked>
    END IF;Hope this helps.
    Regards,
    Manu.
    If my response or the response of another was helpful or Correct, please mark it accordingly

  • Insert data from internal table to ztable.

    Hello Expert,
    I have a ztable with a primary key, now i want to pass my data from the internal table to the ztable . I am using modify option to
    pass the data to the ztable but the problem is if the primary key value is same then its update the first record rather add one row in the zrable .But i want to push all the data what are available in the internal table though all the data are same. I even tried with Insert statement but its seems it doesnot work.
    Can you please advice me the right approach.
    Thanks.
    Satya

    Hi,
    It is all about the primary key fields of the database table.
    Example:
    You have a db table with following fields
    MANDT (primary key field)
    BUKRS (primary key field)
    BELNR (primary key field)
    GJAHR
    VBELN
    and it with same fields.
    MANDT BUKRS BELNR GJAHR VBELN
    120 0010 160000 2008 450000
    120 0010 160000 2007 450003
    120 0020 160000 2008 450000
    200 0010 160001 2008 450001
    200 0010 160001 2007 450001
    If you use INSERT statement, only 3 of these will be inserted into the database table, why?
    Because: Each database table must include one or a very small group of key fields that uniquely identify each table line by its value. These fields are known as the primary keys of the table.
    And as lines 1 and 2 / 4 and 5 have the same MANDT BUKRS and BELNR only one will be inserted into the table.
    If the database table is your own one, you will need to modify it so that it would work.
    Thankyou.
    Regards,
    Dhanalakshmi L

  • How to insert data from a table to database

    Hi all,
    My problem statement is that:
    I have jsp page, which has a table with some columns editable for inserting data. I am using MySql database.
    Now when I insert the data in the table and click submit button , the data entered must get stored in the database.
    If its a single data I can do it , but how to do for mulitple rows or columns.
    Please suggest me a solution
    Regards,
    Suraj

    i did one program similar to this requirement. when the rows and columns are fixed then what is the problem.
    use java script and capture all the values into an array and pass this to servlet and there call a method which will set
    the bean objects. or else no need to pick the array directly pass all the parameters and set the beans by retrieving these
    parameters(request.getParameter()).
    Diablo

Maybe you are looking for

  • Non posso accedere in Windows 8.1

    Ho riscontrato in questi giorni difficoltà ad accedere alla piattaforma creative cloud, sia in mac che in win. Diversamente a mac, che vedo risolto, ancora persistono difficoltà in windows 8.1: Una finestra recita Errore server sconosciuto:

  • Analog to Digital conversion of hi8 tapes

    I have many hi8 video tapes that I have been trying to digitize so that I can import them into my imac. I have connected my analog hi8 camera to a Sony DSC-PC350 mini dv camcorder that has an analog to digital converter (pass through). In the VTR mod

  • Free Abap Development Environment

    Hi, I use to develop in ABAP on SAP R/3 4.6C at work. I would like to know if it's possible to have a free version of R/3 or NetWeaver to learn more about ABAP programming at home and to learn about how to developp using .NET/ JAva technlologies with

  • Dynamic Parameter Batch Size in InfoView

    How do I increase the size of the batches used during prompting for a dynamic parameter?  I am wanting to increase the batch size to a number that will actually allow me to get rid of the "batch" functionality on dynamic parameters.  I am using Cryst

  • How To delete simultaneous multiple mails on iPad ?

    How To delete simultaneous multiple mails on iPad ?