How insert/DML data in the table when the data in the related table changes

Hello guys!

I came across a problem that I need to get fixed. Because I don't know how to start and get it resolved I wanted to ask you for your expertise.

The scenario is as follows:

I have a table 'a' in my 10g database and a view "ab" which combined table 'a' with 'b' table in a view. However, the 'b' table is a table in another schema Manager database. and accessible (read only right) via a database link.

Now here it is: whenever the data changes in table "b", for example 2 new sets of data is inserted, I need to insert automatically the 2 values of these 2 sets of data in my table "a". Same procedure for update and delete in table "b".

The action that inserts data into the table 'a' must be initialized in my database, I have limited access to the other. Can I somehow use a trigger my reviews of "ab" to insert data into the table "a"? Or is it possible to use the "change notification procedure database" using the view as the reference?

Desperately need help and example of all suspicion/code greatly appreciated. I am very new to Oracle and not very fond of PL/SQL routines. So please be so kind as to give me more details.

Thanks in advance - I hope you have any ideas how I can get this problem resolved.

Sebastian

>

... it does not, since the DDL operations are not permitted on the remote databases (ORA-02021). I can't create the trigger on a view either. :-(
So what ways are left to insert data into the table 'a' when the related table changes?

Please, help if you have an idea!

Yes,
You can't perform the DDL (create the trigger...) on remote databases as you can see...
Try to create this trigger in the local database that will make DML (insert into...) on the remote database.

    CREATE OR REPLACE TRIGGER local_forward_pt_after_insert
     AFTER INSERT
         ON N2K_INV_PT
         FOR EACH ROW

     BEGIN
         -- Insert records into table "a"
         INSERT INTO TBL_PUNKTDATEN@remote_database_sid
          ( INT_NUMMER,
            STR_GEBIET
             )
         VALUES
          ( :new.INT_INV_PT_NR,
            :new.GEBIET );
     END;

Thank you

Good luck

Tags: Database

Similar Questions

  • my computer is locked in the options admistritive and I for got my password. How to access and fine the password or change it?

    my computer is locked in the options admistritive and I for got my password. How to access and fine the password or change it?

    Hello dianeweeks,

    Thanks for the reply.  I have included a link below that I hope will help.

    Microsoft's strategy concerning lost or forgotten passwords

    http://support.Microsoft.com/kb/189126

  • ORA-20505: error in DML - data in db Version has changed

    Hello
    Request Express 3.1.0.00.32
    I created a report and master detail in the sample Application on oracle.application.com. I get an error on my Master form when you click < Previous and Next >. I saw other problems of this kind in the forum, but it seems that everyone is a little different. Can someone help me with this error when you browse the next answer (s). Thanks in advance.

    ORA-20505: DML error: p_rowid = 6, p_alt_rowid CUSTOMER_ID =, p_rowid2 =, p_alt_rowid2 is. ORA-20503: current Version of the data in the database has changed since the user initiated the update process. current checksum = checksum of the "E9A08EDC02A82871E6865DB254B09ED2" = "39454529513F24BE60C167752BF71750."

    I created another page master detail and I don't have any errors when scrolling using the <>. This is a process that can be causing my error by using the page master original detail.
    DECLARE 
    CUSTOMER_ID VARCHAR(20);
    BEGIN
     SELECT CUSTOMER_ID INTO :P21_CUSTOMER_ID
     FROM DEMO_CUSTOMERS
     WHERE CUST_FIRST_NAME = :P21_CUST_FIRST_NAME;
    -- processing here
    EXCEPTION
      -- Catches all 'no data found' errors
       WHEN NO_DATA_FOUND THEN
         DBMS_OUTPUT.PUT_LINE
           ('No Data found for SEARCH on ' || CUSTOMER_ID);
    END;
    Published by: Charles was April 30, 2009 11:40

    Hi Charles,

    I had a look at your page 21.

    The problem was that the 'Values of Fetch 2' process was not conditioned and was running in the point of the process "on the load - before the Header." That meant he was running whenever the page is loaded. This process checks the value CUSTOMER_ID in P21_CUST_FIRST_NAME that, because the process of "search for the line...". "has not been performed at that time there (he turns"on the charge - after the Header"), will always return the same value CUSTOMER_ID from when the page was first loaded. The next/previous buttons, however, moved the front/rear P21_CUSTOMER_ID only one value (this became obvious when this field was changed from 'Hidden and protected' to 'Text'). Therefore, the data on the page was for "Albert" but was it to CUSTOMER_ID for any document was previous to the Albert one. Thus, moving next/previous always caused a mixture of real data.

    I changed the "Fetch values 2" process to depend on P21_CUSTOMER_ID is NULL. In this way, the CUSTOMER_ID value found ONLY by code when the page is loaded for the first time. Subsequently, it is controlled by the next/previous feature.

    Andy

  • How can I disable all the related links?

    I never get tired to find the related link info. they pop up whenever I go to another site - I want to get rid of it - please help!

    Sounds like an extension not desired may have snuck on your system, perhaps as a ride-along with some free software.

    Try disabling all extensions essential or unknown here (when in doubt, turn off):

    Firefox orange (or the Tools menu) button > addons > Extensions category (in the left column, click on Extensions)

    Typically, a link will appear above at least an extension disabled to restart Firefox. You can complete your work on the tab and click one of the links in the last step.

    Which closes down?

  • When file/collection, how can I delete all the related items that are not on my last composition?

    Hello, I have a great difficulty using the file/collection a large file I did months ago, because when I use it, the file is created, but it takes 2.5 to space! compared to others of my works, taking almost 1 TB of files, this one is too big and I think by deleting some files, but I don't want to make a mistake, so I wanted to ask here, if it is possible to take a main composition and only do a file/collection of this composition, objects and elements that serve there (the last I made on my account at least, with the elements used on that, because I think that there are many (if not a large part of them) files and elements that are not used in the final version, as scenes of the version beta of my work, the problem is the composition is too long and have a lot of different archives or drop movies then it could take forever to do it manually...

    Thanks for reading me! I hope that this is a solution...

    It's a two-step process:

    1. reduce your project to the desired composition.

    2 recover your files.

  • How to add programmatically to the relational operators in a view criteria

    Hello

    I use JDev 11.1.2.4.

    I developed a custom search engine using the link from the blog of Ashish Awasti.

    http://www.awasthiashish.com/2013/07/implementing-custom-search-form-in-ADF.html

    In my form, I have two attributes emp id and the name of the emp.

    I want to use operators such as =, >, <>, =, < = etc. for the id attribute emp and 'Contains', ' begins by "," End with ' operator etc. to name emp.

    I don't want to use the af:query component I want to use Lovs / autosuggest behavior / field validation on some of the fields (except if I can achieve it in af:query).

    Please can you suggest how can I achieve this?

    Thank you

    Well my guess is that you just fall SelectOneChoice on your page and used hard-coded values (so "value" property would be empty, in this case), but it seems you have SOC based on some ViewObject.

    In this case, you can retrieve the selected value directly from the link layer, something like this: Sameh Nassar: getting the value of a list of SelectOneChoice (not index)

    Dario

  • How to "adjust automatically to the comp' any imported file?

    Hello everyone

    I use a plugin to dynamically import video files in some comps I have configured previously.

    All these compositions are 1280 x 720 and this plugin, when triggered, essentially takes hundreds of videos I have in a specific folder on my PC and products are imported into AE and puts each of them in each model.

    For my job, I sell hundreds of videos annually during the tests (all videos have the same structure). That's why I use this script which automates my work and automatically changes each video.

    THE PROBLEM

    The video files are not the same resolution. Some are 1280 x 720, others are 1920 x 1080.

    The plugin simply products are imported and puts them in the computer, which means that 1920 x 1080 files will not be optimized.

    As you can imagine, I can't open each model and do a right-click on the video and click on 'fit to the model' because, having hundreds of comps, every time, it would be a huge waste of time, and it would be pointless to use a script.

    THE SOLUTIONS THAT I THOUGHT

    (1) is it possible to say AE to automatically adapt to any video imported into a model? (something like "default to the size of the image scale" of the ORGANIZATION)

    (2) If 1 is not possible, I came with a weird, but maybe the solution to work. In each computer, I put an object null for an expression that changes the scale of the imported video. Therefore, when the video is imported, the expression of the NULL object handles to resize the imported video. The question is: How can I know that the expression to change the scale of a video not yet imported (I already have the code of the expression, found somewhere were the web... I just need to tell the null object to apply the term to a video file that is not yet imported)?

    Thanks for the support!

    Expressions don't work that way. They cannot change anything, except the value of the property hosting the expression. You might have the term scaling applied to a placeholder layer, but you would have to modify the script to a replaceSource() with the new images. Or you can modify the script to apply the term directly to the scale property of the new layer of sequences. Whatever it is, you need to change your script.

    Dan

  • How can we sum of the amount in intractive report

    Hello

    I have create an intractive report now, I want the sum of the amount ultimately with the new line as report clasic and how can we arrenge intractive Itemin report, when we create form with relation to select report intractive intractive report.
    How can I do that.

    Hello

    You can use out of global box default security setting and the action menu interactive report
    http://download.Oracle.com/docs/CD/E14373_01/AppDev.32/e11838/app_comp.htm#sthref962

    BR, Jari

  • Error when inserting XML Date in the Table

    Hi all

    I am working on Oracle 11 g and trying to insert a date XML in the table but get error - below

    Query - insert into TableName (ID, CREATION, CREATEDBY) VALUES (50, *'2010 - 12-15 T 12: 57:19'*, 'Name')

    Error - java.sql.SQLDataException: ORA-01861: literal does not match the format string

    CREATED column datatype is Date

    When I try to use sysdate instead of hard-coding XML date of obtaining inserted successfully into the table. Please let me know how to pass this XML format date.

    Thanks in advance.

    Concerning
    Nikhil

    I don't see any XML in what you posted. In any case:

    "2010 12-15 T 12: 57:19'.

    is a string, not a date. Use:

    to_date('2010-12-15T12:57:19','YYYY-mm-dd"T"HH24:mi:SS')

    For example:

    SQL> create table tbl(created date);
    
    Table created.
    
    SQL> insert into tbl values('2010-12-15T12:57:19');
    insert into tbl values('2010-12-15T12:57:19')
                           *
    ERROR at line 1:
    ORA-01861: literal does not match format string
    
    SQL> insert into tbl values(to_date('2010-12-15T12:57:19','YYYY-MM-DD"T"HH24:MI:SS'))
      2  /
    
    1 row created.
    
    SQL> 
    

    SY.

  • How to use the slider in the insertion of data in table to another

    Hi all

    I am beginner in oracle and I have a question to deal with my table

    I have 2 table lets say (c1) and (c2).

    C1 contains the following columns (product_number, product_name, description)

    C2 contains the following columns (product_code, product_id, description)

    I need to build anonymous blocks including cursor, this extraction of cursor data c2 to insert in c1 in the following way:

    product_code = product_number,

    product_id = product_name,

    description = description

    a help can you please...?

    Thanks for all,

    Best regards.

    Sorry to say that this is not "talking nonsense." the statement below, you wrote, updated the TABLE whenever a row is inserted:

    Update products

    Set service_code = 'VOIP', Charge_type = 'FIXED', PRODUCT_TYPE = 'SERVICE', super_product = 'n',

    available = 'Y', default_bill_method = 'TIPS', default_prorate = 'Y', gl_code = '00000',.

    service_type = "COMPLEMENTARY", partner_code is "oman", used_service_code = "VOIP."

    I can't believe that's what you intend to update an entire table every time that a row is inserted.

    The second problem I see is that you try to use v_x and you aren't anything to assign to this variable.  Whence 'rownum '?  ROWNUM is generated when choosing and assigned to the rows in a result set.  Looking at a rewrite of your code that actually works now:

    SQL > declare
    2
    3 v_sku TMP_TABLE. Type % SKU;
    v_DESCRIPTION 4 tmp_table. DESCRIPTION of % type;
    5 v_MSRP TMP_TABLE. Type of MSRP %;
    6 v_BILLING_FREQUENCY TMP_TABLE. Type of BILLING_FREQUENCY %;
    7 v_ALLOW_PRICE_CHANGE TMP_TABLE. Type of ALLOW_PRICE_CHANGE %;
    8 v_status TMP_TABLE. % OF STATUS TYPE.
    v_x 9 varchar2 (20);
    10
    11 tmp_product of CURSOR IS
    12. SELECT "p" | status of prod_id, SKU, LTrim (to_char(rowNum,'0999999')), ALLOW_PRICE_CHANGE, BILLING_FREQUENCY, advised, DESCRIPTION retail price
    13 FROM tmp_table
    14 where sku is not null;
    15
    BEGIN 16
    17
    18 open tmp_product;
    19
    loop 20
    21
    22 extract tmp_product in v_x, v_SKU, v_status, v_DESCRIPTION, v_MSRP, v_BILLING_FREQUENCY, v_ALLOW_PRICE_CHANGE;
    23 when the output tmp_product % notfound;
    24
    25 INSERT INTO PRODUCTS (product_code, product_name, description, available, DEFAULT_BILL_FREQ, APPLY_SPECIAL_RATES)
    26 values (v_x, v_SKU, v_DESCRIPTION, v_status, v_BILLING_FREQUENCY, v_ALLOW_PRICE_CHANGE);
    27
    28 END LOOP;
    29 close tmp_product;
    30
    31 products update
    32 set service_code = 'VOIP', Charge_type = 'FIXED', PRODUCT_TYPE = 'SERVICE', super_product = 'n',
    33 available = 'Y', default_bill_method = 'TIPS', default_prorate = 'Y', gl_code = '00000',.
    34 service_type = 'SUPPLEMENTARY', partner_code = 'oman', used_service_code is "VOIP."
    35
    36 commit;
    END 37;
    38.

    PL/SQL procedure successfully completed.

    SQL >
    SQL > select *.
    2 from products
    3 where rownum<>

    PRODUCT_CODE PRODUCT_NAME DESCRIPTION AVAILABLE SERVER PRODUCT_TYPE CHARGE_T DEFAULT_BILL S DEFAULT_BILL D GL_CO PARTNER_ USED_SER APP SERVICE_TYPE
    -------------------- ---------------------------------------- -------------------------------------------------------------------------------- ------------ ------------ -------- -------- ------------ - ------------ - ----- -------------------- -------- -------- ---
    p0000095 Plerkle213 Plerkle Best Ever!                                                               Y QUARTERLY VOIP FIXED SERVICE N TIPS Y 00000 ADDITIONAL oman VOIP YES
    p0000096 Plerkle214 Plerkle Best Ever!                                                               Y QUARTERLY VOIP FIXED SERVICE N TIPS Y 00000 ADDITIONAL oman VOIP YES
    p0000097 Plerkle215 Plerkle Best Ever!                                                               Y QUARTERLY VOIP FIXED SERVICE N TIPS Y 00000 ADDITIONAL oman VOIP YES
    p0000098 Plerkle216 Plerkle Best Ever!                                                               Y QUARTERLY VOIP FIXED SERVICE N TIPS Y 00000 ADDITIONAL oman VOIP YES
    p0000099 Plerkle217 Plerkle Best Ever!                                                               Y QUARTERLY VOIP FIXED SERVICE N TIPS Y 00000 ADDITIONAL oman VOIP YES
    p0000100 Plerkle218 Plerkle Best Ever!                                                               Y QUARTERLY VOIP FIXED SERVICE N TIPS Y 00000 ADDITIONAL oman VOIP YES
    p0000101 Plerkle219 Plerkle Best Ever!                                                               Y QUARTERLY VOIP FIXED SERVICE N TIPS Y 00000 ADDITIONAL oman VOIP YES
    p0000102 Plerkle220 Plerkle Best Ever!                                                               Y QUARTERLY VOIP FIXED SERVICE N TIPS Y 00000 ADDITIONAL oman VOIP YES
    p0000103 Plerkle221 Plerkle Best Ever!                                                               Y QUARTERLY VOIP FIXED SERVICE N TIPS Y 00000 ADDITIONAL oman VOIP YES
    p0000104 Plerkle222 Plerkle Best Ever!                                                               Y QUARTERLY VOIP FIXED SERVICE N TIPS Y 00000 ADDITIONAL oman VOIP YES

    10 selected lines.

    The update has been moved out of the loop, the useless '<>null' condition has been changed to "is not null" and v_x is generated by the cursor query itself.

    David Fitzjarrell

  • Need to insert test data in all the tables that were present in a schema

    Hello

    I use Oracle 9i.

    10 tables were present in my current schema. All tables are not having all the records.

    I need to insert test data in each table using a single procedure. (the table name is inparameter for the procedure)

    For example, I test_emp, test_sal tables.

    CREATE TABLE test_emp (ename varchar2 (40), number of sal);
    CREATE TABLE test_sal (it NUMBER, rank NUMBER, will designate the NUMBER);

    I need to insert some test data in these tables. I shouldn't use utl_file or sql * loader for this.

    I tried below way.
    -- Incomplete code
    
    CREATE OR REPLACE PROCEDURE test_proc_insertdata(p_table_name IN VARCHAR2) IS
    
    BEGIN
    
      --Selected all the column_names, data_type, data_length into a collection variable from user_tab_columns.
    
      SELECT u.column_name, u.data_type, u.data_length
      --BULK COLLECT INTO l_col_tab
        FROM user_tab_columns u
       WHERE u.table_name = p_table_name;
    
      -- generated the values using below statement
      
        SELECT decode(u.DATA_TYPE,'VARCHAR2',dbms_random.string('A', u.data_length),'NUMBER',TRUNC(dbms_random.value(1, 5000)),'DATE',SYSDATE) val_list
        -- INTO collection varaible
          FROM user_tab_columns u
         WHERE TABLE_NAME = p_table_name;  
       
    
    END;
    I am not able to transmit these values to the collection dynamically to the INSERT statement. I tried many ways, but I am not satisfied with the code I've written.

    Please help me if you know a better idea.



    Thank you
    Suri

    Suri wrote:
    Hello

    I use Oracle 9i.

    10 tables were present in my current schema. All tables are not having all the records.

    I need to insert test data in each table using a single procedure. (the table name is inparameter for the procedure)

    For example, I test_emp, test_sal tables.

    CREATE TABLE test_emp (ename varchar2 (40), number of sal);
    CREATE TABLE test_sal (it NUMBER, rank NUMBER, will designate the NUMBER);

    I need to insert some test data in these tables. I shouldn't use utl_file or sql * loader for this.

    I tried below way.

    -- Incomplete code
    
    CREATE OR REPLACE PROCEDURE test_proc_insertdata(p_table_name IN VARCHAR2) IS
    
    BEGIN
    
    --Selected all the column_names, data_type, data_length into a collection variable from user_tab_columns.
    
    SELECT u.column_name, u.data_type, u.data_length
    --BULK COLLECT INTO l_col_tab
    FROM user_tab_columns u
    WHERE u.table_name = p_table_name;
    
    -- generated the values using below statement
    
    SELECT decode(u.DATA_TYPE,'VARCHAR2',dbms_random.string('A', u.data_length),'NUMBER',TRUNC(dbms_random.value(1, 5000)),'DATE',SYSDATE) val_list
    -- INTO collection varaible
    FROM user_tab_columns u
    WHERE TABLE_NAME = p_table_name;  
    
    END;
    

    I am not able to transmit these values to the collection dynamically to the INSERT statement. I tried many ways, but I am not satisfied with the code I've written.

    Please help me if you know a better idea.

    Thank you
    Suri

    With some effort, you can write dynamic insert queries. Read the data dictionary views ALL_TABLES and ALL_TAB_COLUMNS to get the data you need. You may need to limit the list to the tables you specify to hardcode the names of the tables. You can read the views for the information of table and column that you need generate the insert column orders. It will be a lot of work and it might be easier to simply hardcode values. Dynamic SQL is difficult to debug and work with: (.) Something like this (untested and totally undebugged)

    declare
      cursor v_tab_col(p_table_name) is select * from all_tab_columns where table_name = p_table_name;
      v_text varchar2(32767);
      v_table_name varchar2(30);
    begin
      v_table_name := 'DUAL';
      --chr(10) is a newline for readability when debugging
      v_text := 'insert into '||v_table_name||chr(10)||'(';
      --loop to build column list
      for v_tab_rec in v_tab_col loop
        --add comma if not first item in list
        if v_tab_col%rowcount > 1 then
          v_text := v_text ||',';
        end if;
        v_text := v_text || v_tab_rec.column_name;
      end loop;
      v_text := v_text ||') values ('||
      --loop to build column values
      for v_tab_rec in v_tab_cur loop
        if (v_tab_rec.datatype = 'VARCHAR2') then
          --add comma if not first item in list
          if v_tab_col%rowcount > 1 then
            v_text := v_text ||',';
          end if;
          if v_tab_rec.datatype = 'NUMBER' then
           v_text := v_text || '9';
           elsif v_tab_rec.datatype = 'VARCHAR2' then
             v_text := v_text ||'X';
          end if;
      end loop;
      v_text := v_text || ')';
      execute immediate v_text;
    end;
    

    This code is not effective, but shows how to do what you described. You'll have to code for all data types you need and find a way to take into account the primary/foreign keys, yourself. I leave it to you to find a way to avoid selecting the data twice ;)
    Good luck!

    Published by: riedelme on July 24, 2012 13:58

  • How to publish data from a table using the form

    Oracle forms6i

    Hai All

    I have download the data to the table of forms...

    My table T1 columns are in, out, intrinsically, introut, empname, empno


    and another table T2 consist of three columns is empno, date, time

    In table T2 time fields consist of symbol I, o... I mean IN, O OUT

    My Question is when an employee consist of 3 I - the three IN the time


    0815 I, 1200 I, 1415 I and OUT 3 times O 1245, 1445 O, O 1715 and empno is 001

    If there is no record for empno 001 then insert first 0815 I in table T1 in column IN time then

    to update 1200 intrinsically and 1245 update to Introut and 1415 up-to-date addin and 1445 to update addout


    Finally in 1715 to outtime

    If it is possible to do without Hardcoding the moment Pls tell with some good example


    Thanks in advance

    Srikkanth.M

    There now things are clear... whenever I have free I'll post the code u how to do this...

    for now, a few tips can help u

    -create the table to store operations travel so then u can't fix your code

    -Create the cursor on the T1 line through all the records.

    -Control what empno and action i.e. the current cursor (I or O) exists on the same date in T2 or not

    -otherwise exists insert a new record check also the SHIFT is coming in time IF is between MAJ 0815 and 1645 and action is 'I' then insert record and column values accordingly

    s ' there is, then update the record of the place where empno = cur.empno and attendance_date = mydate;

    It may be useful

    Baig,
    [My Oracle Blog | http://baigsorcl.blogspot.com/]

  • How to add data to the table using Manager POST for restful Apex application

    Hi all

    I managed to create a service application web Manager restful using GET for the Restful service module. I am able to get the data in row on the presentation of a table row id in the application. But I can't find an appropriate example, how the new data in the table can be posted or deleted. I created a POST handler for a URI scheme and look forward on how to proceed. Any help would be really appreciated.

    Source for the POST Manager:

    Start

    insert into ALL_BOOKS values(:id,:book);

    end;

    Also created 2 parameters id and the book.

    Hi jerry2134,

    jerry2134 wrote:

    I managed to create a service application web Manager restful using GET for the Restful service module. I am able to get the data in row on the presentation of a table row id in the application. But I can't find an appropriate example, how the new data in the table can be posted or deleted. I created a POST handler for a URI scheme and look forward on how to proceed. Any help would be really appreciated.

    Source for the POST Manager:

    Start

    insert into ALL_BOOKS values(:id,:book);

    end;

    Also created 2 parameters id and the book.

    Check out the following tutorials OBE, that explains the creation of GET and POST RESTful Web Services and how to use them in the APEX.

    Also what yo mean "looking forward on how to proceed? Do you want to or created for use/consume in your Oracle APEX application hosted RESTful web services?

    If Yes, in your Application, you must create a RESTful Web Service reference -> shared components. Then, create a form/report based on Web Service reference.

    Kind regards

    Kiran

  • How can I insert a date on the signature line?

    How can I insert a date automatically on the signature line?

    Digital signature fields display the date and time when they were signed by default.

  • Insert XML data from the Table-&gt; back to null

    Dear Experts,

    -I have table xml as below:

    Example of CREATE TABLE (XML_spec XMLTYPE);

    Insert in the example
    Select ' < name of Message = "dataStaticInvestor" type = "IncomingMessage" >
    < name of field = "batchReference" > OPENINGBATCH000000 < / field > < List name = "data" >
    < = record name "data" >
    < name of field = "externalReference" > 01234567890aaaaaaa < / field >
    < name of field = "participantID" > OD001 < / field >
    < name of field = "participantName" > EQUITY SECURITIES INDONESIA, PT < / field >
    < / recording >
    < = record name "data" >
    < name of field = "externalReference" > 01234567890aaaaaaa < / field >
    < name of field = "participantID" > OD001 < / field >
    < name of field = "participantName" > EQUITY SECURITIES INDONESIA, PT < / field >
    < / recording >
    < = record name "data" >
    < name of field = "externalReference" > 01234567890aaaaaaa < / field >
    < name of field = "participantID" > OD001 < / field >
    < name of field = "participantName" > EQUITY SECURITIES INDONESIA, PT < / field >
    < / recording >
    < / list >
    < / message > ' double.

    Select * example;

    create table hasil1 (c1 varchar2 (500), c2 varchar2 (500), c3 varchar2 (500));

    -This step I create the procedure to insert xml data into the table as the batch.

    DECLARE
    x XmlType;
    BEGIN
    Select XML_SPEC in x for example;

    insert into hasil1
    SELECT
    p.Extract('/Record/Field/@externalReference').getstringval (C1),
    p.Extract('/Record/Field/@participantID').getstringval (C2),
    p.Extract('/Record/Field/@participantName').getstringval () as c3
    TABLE (XMLSequence (Extract(x,'Message/List/Record'))) p;
    commit;
    END;
    /

    -when the result of select hasil1, the output is back 3 rows and 3 columns, but all data is a null *.

    Best regards
    Sigcle

    You don't explain what output you need, but I guess something like this:

    SQL> insert into hasil1 (c1, c2, c3)
      2  select x.c1, x.c2, x.c3
      3  from example t
      4     , xmltable(
      5         'Message/List/Record'
      6         passing t.xml_spec
      7         columns c1 varchar2(500) path 'Field[@name="externalReference"]'
      8               , c2 varchar2(500) path 'Field[@name="participantID"]'
      9               , c3 varchar2(500) path 'Field[@name="participantName"]'
     10       ) x
     11  ;
    
    3 rows inserted
    
    SQL> select * from hasil1;
    
    C1                     C2        C3
    ---------------------- --------- --------------------------------
    01234567890aaaaaaa     OD001     EQUITY SECURITIES INDONESIA,PT
    01234567890aaaaaaa     OD001     EQUITY SECURITIES INDONESIA,PT
    01234567890aaaaaaa     OD001     EQUITY SECURITIES INDONESIA,PT
     
    

Maybe you are looking for

  • Since the upgrade to ver 11 flash player 11 disappears on reboot

    Since upgrading to firefox 11 I need to reinstall adobe flash player 11 whenever it disappears when I reboot. But works fine otherwise.Also after you download the download window stops responding. This happens all the time lately.

  • AOL start automatically when my Notebook boot

    Why Aol automatically starts up when I start the computer? I have a Satellite 2065 CD. It drives me crazy.

  • Satellite C855-149 stop being disconnected from the network

    OK, so yesterday I had to switch my cell of a room to another (it's a Toshiba Satellite C855-149).Its usually connected to the grid, so I moved and everything was fine. After a few hours, I decided to go back to my room and as soon as I unplugged my

  • How to compare two columns in Xl

    I want to compare two columns in the file of Xl. column A contains phrases and column B contains the words For example Column A                                                                       Column B                                            

  • features lost when reinstalling windows 7 ultimate?

    During my first installation of windows 7, he had this thing like organizing on the desktop. It has different subjects and the subjects had shortcuts to my programs. It would be like "microsoft office" and when I clicked on tiny shortcuts seems that