Inserting data from bulk - help needed.

Hi all

I have two tables 'Plan_zip' and 'Service_zip '.
The paintings are store postal code values as there is no relationship between these tables.
The number of records in both tables is 3 lakhs and 2 lakhs respectively.

Now I have another 'Zip_info' table, which stores the values of postcodes.

My scenario is, I have check postal codes in the tables Plan_zip and Service_zip
and insert these records in the Zip_info table for that zip code does not match.

How can I achieve this.

Thanks in advance

Concerning
Rambeau

I tested on 11g box available to me and everything works well, this isn't a problem general 11g (I didn't really know it was, but you never know).

Tags: Database

Similar Questions

  • Insert data from one table to another

    I have two tables SALES_MASTER and SALESMAN_MASTER which is described below.

    SQL > desc SALES_MASTER;
    Name Null? Type
    ----------------------------------------- -------- ----------------------------
    NO VARCHAR2 (6)
    NAME VARCHAR2 (20)
    PIN NUMBER (8)
    CITY VARCHAR2 (20)
    VARCHAR2 (20) STATE



    SQL > desc SALESMAN_MASTER;
    Name Null? Type
    ----------------------------------------- -------- -----------------------
    SALESMANNO VARCHAR2 (6)
    SALESMANNAME VARCHAR2 (20)
    ADDRESS1 VARCHAR2 (30)
    ADDRESS2 VARCHAR2 (30)
    CITY VARCHAR2 (20)
    PIN NUMBER (8)
    VARCHAR2 (20) STATE
    SALAMT NUMBER (8.2)
    TGTTOGET NUMBER (6.2)
    YTDSALES NUMBER (6.2)
    REMARKS VARCHAR2 (60)

    I want to insert data from SALESMAN_MASTER (2nnd table) to SALES_MASTER(first table). I want to insert only two columns NO, NAME and PIN code. All of these columns are compatible. I tried this command. But it's not working. Help me.

    SQL > insert into SALES_MASTER
    2 (NO., NAME, PIN CODE)
    3 values
    4. Select SALESMANNO, SALESMANNAME, PIN code
    5 SALESMAN_MASTER;
    Select SALESMANNO, SALESMANNAME, PIN code
    *
    ERROR on line 4:
    ORA-00936: lack of expression
    INSERT INTO SALES_MASTER
       ( NO
       , Name
       , PINCODE )
       SELECT SALESMANNO
            , SALESMANNAME
            , PINCODE
         FROM SALESMAN_MASTER;
    

    Kind regards
    Christian Balz

  • How can I insert data from another table into a table containing a timestamp column

    How you insert data from another table in a table if the target table contains a timestamp column. I tried to set the default value of GETDATE() column in the target table, but it does not work.


    I use MS SQL

    Sorry, I managed to get around this by inserting null as the value

  • Getting error while inserting data from source to the target in the procedures?

    Hello

    I want to insert the data from the source to the target in the procedures, have the same schema.

    For this, I did as follows

    Command on the source:

    Technologies: oracle

    Schema: EDWHCMB

    Command:

    SELECT COMPANY_NAME, COMPANY_CODE OF

    EDWHCMB. DWT_COMAPNY

    Command on the target:

    Technologies: oracle

    Schema: EDWHCMB

    command:

    INSERT INTO EDWHCMB. TEMP

    VALUES)

    COMPANY_CODE,

    COMPANY_NAME)

    I have run the procudere then I got error as follows

    ODI-1228: SAMPLE1 (procedure) task fails on ORACLE EDWH connection target.

    Caused by: java.sql.BatchUpdateException: ORA-00984: column not allowed here.


    How to insert the data from the source to the target in the proceedings?

    Please send any document to this...

    Please help me.

    Thanks in advance,

    A.Kavya.

    Hi Bruno.

    If your tables are on the same schema then why do you use command on the source and the command on the target? You can simply do the following on the command on the target

    INSERT INTO EDWHCMB. TEMP

    SELECT COMPANY_NAME, COMPANY_CODE OF

    EDWHCMB. DWT_COMAPNY


    If you really want at all to use the command on the source and target both then I think you need to change the following code on your order on the target

    INSERT INTO EDWHCMB. TEMP

    VALUES)

    : COMPANY_CODE,.

    (: COMPANY_NAME)

    Hope your TEMP table has only these 2 columns.

    Thank you

    Ajay

  • Inserting data from one table to another table

    Hello

    I have the following SQL where I am updating a table by adding new data from another table, but without success.

    INSERT INTO
    () TOP_PROSPECTS
    COMMON_ID
    DATE_ADDED
    REVIEW_RANK
    EVAL_DATE
    PM_ASSIGN
    WHY_NOTES)
    SELECT
    t.COMMON_ID
    t.DATE_ADDED
    t.REVIEW_RANK
    t.EVAL_DATE
    t.PM_ASSIGN
    t.WHY_NOTES
    Of
    TEMP_IVAN_MARY t
    WHERE
    COMMON_ID <>t.COMMON_ID

    Any suggestions?

    Thank you.

    Published by: user13822709 on August 14, 2012 09:14

    Published by: user13822709 on August 14, 2012 09:15

    Is that what you're trying to do with the insert. I think there may be a sign {noformat}<{noformat}{noformat}>{noformat} missing in the where clause. This site eat those, so you need to use the equivalent! = post here.

    If I'm wrong about the missing trader, then it looks like you want to insert rows in temp_ivan_mary that are not already in top_prospects. If Yes, then you need something like:

    insert into top_prospects
       (common_id, date_added, review_rank, eval_date, pm_assign,
        why_notes)
    select t.common_id, t.date_added, t.review_rank, t.eval_date,
           t.pm_assign, t.why_notes
    from temp_ivan_mary t
    where t.common_id not in (select common_id from top_prospects
                              where common_id is not null)
    

    Function index and data available volumnes etc. then a mergr can be more effective. Something like:

    merge into top_prospects p
       using (select common_id, date_added, review_rank, eval_date,
                     pm_assign, why_notes
              from temp_ivan_mary) t
       on (p.common_id = t.common_id)
       when not matched then
          insert (common_id, date_added, review_rank, eval_date, pm_assign,
                  why_notes)
          values (t.common_id, t.date_added, t.review_rank, t.eval_date,
                  t.pm_assign, t.why_notes)
    from temp_ivan_mary t
    

    John

  • Insert data from a particular region.

    I have two region report...

    I use apex item to insert data into a table. When I try to insert the data from the 2nd report region, region 1 data get insert instead of the 2nd region report data.

    How to distinguish the point of apex from one region to another region?

    This is my 2nd region (doc) report
    insert into doc values(apex_application.g_f02(i),apex_application.g_f03(i),apex_application.g_f04(i));
    How to solve this problem?

    SKUD.

    Hello

    Make sure that the columns of report 2 region should not have same value p_idx.
    Example-

    Report 1 query
    
    select apex_item.text(1 , null);
    
    Report 2 query
    
    select apex_item.text(1, null);
    

    In the example above if you see the both the query have same p_idx value in 1...

    In this case, if you try to save the data in the second report it will save the data in the first report.

    To avoid this, you must make sure that the p_idx value is different... This is... If you the first query has five columns with p_idx the value 1, 2, 3, 4, 5... so for next report make sure that the value of p_idx must be greater than 5... for example... 6, 7, etc.

    Kind regards
    Shijesh

  • Insert data from variables in the Ref Cursor

    I do not know how to return data from ref cursor variables That's what I've tried so far...
    CREATE OR REPLACE type num_obj as object (
      t_number number ,
      t_type varchar2(10) ,
      t_desc varchar2(40)
    ); 
    CREATE OR REPLACE type num_table as table of num_obj; 
    
    procedure get_all_data(p_p1 in varchar2, p_rc OUT SYS_REFCURSOR) is
       l_dat1 number := 2;
       l_dat2 varchar2(10);
       l_dat3 varchar2(40);
       t_num_o num_obj;
       t_num_t num_table;
    begin
      for l_indx in 1..5 loop
         l_dat1 := l_dat1 + l_indx;
         if ( mod(l_dat1,2)=0) then
           l_dat2 := 'EVEN';
         else
           l_dat2 := 'ODD';
         end if;
         l_dat3 := 'Number ' || l_dat1 || ' is ' || l_dat2 || ' number'; 
         l_num_o := num_obj (l_dat1, l_dat2, l_dat3);
         l_num_t := num_table(l_num_o);
      end loop;
      open p_rc for select * from table(l_num_t);
      close p_rc;
    end;
    At the end, to achieve this in Ref Cursor:
    t_number | t_type | t_desc
    ---------------------------------------
    3        | ODD    | Number 3 is ODD number
    5        | ODD    | Number 5 is ODD number
    8        | EVEN   | Number 8 is EVEN number
    12      | EVEN    | Number 12 is EVEN number
    17      | ODD     | Number 17 is ODD number
    Can something like that, where I did wrong?

    BTW. I did this with the function in pipeline, now I want to try a different method.

    The refcursor can not be closed in the procedure - you must return refcursor open to the appellant.
    the appellant must read and then close it.
    There are also some errors in the names of variables and an assignment to the collection.

    Try this version:

    CREATE OR REPLACE
    PROCEDURE GET_ALL_DATA(P_P1 IN VARCHAR2, P_RC OUT SYS_REFCURSOR) IS
       l_dat1 number := 2;
       l_dat2 varchar2(10);
       L_DAT3 VARCHAR2(40);
       L_NUM_O NUM_OBJ;
       l_num_t num_table := num_table() ;
    BEGIN
      for l_indx in 1..5 loop
         l_dat1 := l_dat1 + l_indx;
         if ( mod(l_dat1,2)=0) then
           l_dat2 := 'EVEN';
         else
           l_dat2 := 'ODD';
         end if;
         l_dat3 := 'Number ' || l_dat1 || ' is ' || l_dat2 || ' number';
         L_NUM_O := NUM_OBJ (L_DAT1, L_DAT2, L_DAT3);
         L_NUM_T.EXTEND;
         l_num_t( l_indx ) := l_num_o;
      end loop;
      OPEN P_RC FOR SELECT * FROM TABLE(L_NUM_T);
    END;
    /
    
    SQL> variable xx refcursor
    SQL> execute GET_ALL_DATA( '', :xx );
    
    PL/SQL procedure successfully completed.
    
    SQL> print :xx
    
      T_NUMBER T_TYPE     T_DESC
    ---------- ---------- ----------------------------------------
          3 ODD           Number 3 is ODD number
          5 ODD           Number 5 is ODD number
          8 EVEN       Number 8 is EVEN number
         12 EVEN       Number 12 is EVEN number
         17 ODD           Number 17 is ODD number
    
  • I need to insert data from the parent to the child table inheritance

    Hi everyone I m using jdeveloper 12

    I have this use EDC:

    I m trying to have mini-programm in which i

    create porject, used to create and assign an employee as the project manager:

    It is therefore my phyiscal using uml data model

    cap1.PNG

    cap2.PNG

    My problem is: I need to see the values in the employee table, choose an employee id s and with the form create in this table: Project Manager: insert the employee with the s project id id

    but when I navigate to the form it is already full of I don't know why

    I did not understand your problem clearly.

    Could you please explain the problem with some screen shots and step by step flow?

    See you soon

    AJ

  • Insert data from 3 tables of diff with some transpose logic

    Hi all

    I need to create a MS which will have three settings:

    Mast_report_id number, posted_on_date date, number of redord_id

    I have four tables which one is the destination and reset three source tables:

    The source tables:

    1 - mast_report

    create the table MAST_REPORT

    (

    MAST_REPORT_ID Number (38) not null,

    ANNUAL NUMBER (38),

    TITLE VARCHAR2 (500),

    STATUS VARCHAR2 (10),

    DATE OF POSTED_ON,

    NO_OF_PAGES NUMBER (8).

    BILLABLE_PAGES NUMBER (8).

    MAST_LANGUAGE VARCHAR2 (20).

    CONTRIBUTOR VARCHAR2 (80).

    CRAWL_DATE TIMESTAMP (6) default sysdate,.

    FILE_NAME VARCHAR2 (30),

    PAGE_PRICE NUMBER (10,2).

    DOC_PRICE NUMBER (10,2).

    CONTRIBUTOR_ID NUMBER (20)

    );

    2 - report_details:

    create the table REPORT_DETAILS

    (

    RECORD_ID Number (38) not null,

    DOC_ID Number not null, (38)

    ATTRIBUTE_TYPE VARCHAR2 (10),

    ATTRIBUTE_VALUE VARCHAR2 (200),

    REPORT_TYPE VARCHAR2 (100),

    ATTRIBUTE_ID VARCHAR2 (80)

    );

    3 - filters_for_docid:

    create the table FILTERS_FOR_DOCID

    (

    FILTER_ID Number not null, (38)

    CONTRIBUTOR VARCHAR2 (100),

    AUTHOR VARCHAR2 (100) default not null, "No. FILTERS".

    COUNTRY VARCHAR2 (100) default not null, "No. FILTERS".

    VARCHAR2 (100) region "No. FILTERS" not null default,

    COMPANY VARCHAR2 (100) default not null, "No. FILTERS".

    INDUSTRY VARCHAR2 (100) default not null, "No. FILTERS".

    VARCHAR2 (100) of the default OBJECT not null, "No. FILTERS".

    CREATED_DATE TIMESTAMP (6) SYSTIMESTAMP not null default,

    REPORT_TYPE VARCHAR2 (100) default not null, "No. FILTERS".

    NOM_FLUX VARCHAR2 (200),

    CHANNEL_ID NUMBER (8).

    NUMBER OF CU_ID

    );

    Destination table: filtered_document

    database version:

    BANNER
    1Oracle Database 11 g Release 11.2.0.1.0 - 64 bit Production
    2PL/SQL Release 11.2.0.1.0 - Production
    3CORE11.2.0.1.0Production
    4AMT for Linux: Version 11.2.0.1.0 - Production
    5NLSRTL Version 11.2.0.1.0 - Production

    As I menteioned above the user will pass three parameters: Mast_report_id, posted_on_date, redord_id

    Here, I need to take more condition (>) to the three parameters.

    For the extraction of data, the logic is below:

    Mast_report table has two columns mast_report_id and posted_on, we need to take a larger than the condition as:

    "Select * from mast_report where and mast_report_id > 7326280 and posted_on > 25 may 2015;

    It will show many recordings roughly 10,000 with all the columns including annual column, this annual column is card with doc report_details of the table

    Now report_details table, we need recover data with annual report_details = (all the table of mast_report annual that we extract our first query) and record_id > settings of this sp record id.

    lets assume he'll again get 10000 files with all the columns.

    Now the main logic is to extract the data of using our highest performance and the third table FILTERS_FOR_DOCID.

    Assume that this is the result of our query above:

    RECORD_IDANNUALATTRIBUTE_TYPEATTRIBUTE_VALUEREPORT_TYPEATTRIBUTE_ID
    17057411269222703COMPANYTGS NOPEC GEOPHYSICAL COMPANY ASASOCIETY REPORT100203621
    27112370469222704COMPANYVOLVO ABSOCIETY REPORT100062389
    37096287469222713COMPANYPARTNERRE LTD.SOCIETY REPORT100037448
    47056915069222713COMPANYPARTNERRE LTD.SOCIETY REPORT100037448
    57056788869222729COMPANYVITAMIN SHOPPE INC.SOCIETY REPORT108008193
    67038574869222749COMPANYABB LTD.SOCIETY REPORT100096991
    77096286569222756COMPANYMETTLER-TOLEDO INTERNATIONAL INC.SOCIETY REPORT100081108
    87056897869222756COMPANYMETTLER-TOLEDO INTERNATIONAL INC.SOCIETY REPORT100081108
    97038576169222777COMPANYSUNCOR ENERGY INC.SOCIETY REPORT100063497
    107056938969222784COMPANYSYMANTEC CORP.SOCIETY REPORT100043382
    117112676469222786COMPANYARROW ELECTRONICS INC.SOCIETY REPORT100084937

    here if using separate attribute_type of report_details, we have:

    Select distinct report_details attribute_type;

    ATTRIBUTE_TYPE
    1Object
    2INDUSTRY
    3COUNTRY
    4REGION
    5AUTHOR
    6COMPANY

    Here you can see over the structure of the third table table FILTERS_FOR_DOCID where above these distinct values of the second table are the columns of the third:

    And you can see the output of the query above to report_details table, including the attribute_type and attribute_type value.

    Here, we need to find in the third table with each attribute_type and values of his attribute_type_value with the topic of the third table columns, industry,... He values.

    as: consider attribute_type values 'COMPANY' and its "TGS NOPEC GEOPHYSICAL COMPANY ASA" attribute_value now we need to find

    in SOCIETY the third table cloumn with value "TGS NOPEC GEOPHYSICAL COMPANY ASA"... same for others...

    I must now go look for these lines of the third table which all combinations get matched, need us compare with like operator between the attribute_type column value and the value of the columns in the third diff table.


    Thanks in advance

    I have impleted above the requirement using pivot, CTE, and cases in where clause.

    Thanks for all the help

  • Inserting data from a query to an existing table

    How do I change my code to make it work correctly? It currently compiles I think because the program believes that the size of v_stats_5d_1 can be different from c_stats_5d_1. I have these errors:

    LINE/COL ERROR

    -------- ------------------------------------

    30/10 PL/SQL: statement ignored

    30/23 PL/SQL: ORA-00947: not enough values

    CREATE OR REPLACE PACKAGE IN THE PKG_RISK_MONITOR

    PROCEDURE CREATE_STATS_5D)

    P_CONTEXT_DATE IN VARCHAR2

    );

    END PKG_RISK_MONITOR;

    /

    CREATE OR REPLACE PACKAGE BODY PKG_RISK_MONITOR AS

    PROCEDURE CREATE_STATS_5D)

    P_CONTEXT_DATE IN VARCHAR2

    )

    IS

    l_ct NUMBER;

    CURSOR c_stats_5d_1

    IS

    SELECT MIND_ACCOUNTS. CLIENT_ID, MIND_ACCOUNTS. CLIENT_NAME, SUM (DATA. CREATED_TRANSACTIONS_NUMBER) AS SUM_CREATED_TRX_NUMBER, SUM (DATA. CREATED_refunds_NUMBER) SUM_CREATED_REFUNDS_NUMBER, SUM (DATA. CREATED_TRANSACTIONS_value * Conversion_rate) CREATED_TRX_EUR_VALUE, DATA. PROCESSING_DATE

    OF (MIND_ACCOUNTS INNER JOIN DATA ON MIND_ACCOUNTS. ACCOUNT_ID = DATA. CURRENCY_conversion INNER JOIN MERCHANT_CID) ON THE DATA. CURRENCY = CURRENCY_conversion. CURRENCY

    GROUP OF MIND_ACCOUNTS. CLIENT_ID, MIND_ACCOUNTS. CLIENT_NAME, DATA. PROCESSING_DATE

    (DATA. PROCESSING_DATE > = TO_DATE (P_CONTEXT_DATE, 'dd-mm-yyyy')-4) and DATA. PROCESSING_DATE < = TO_DATE (P_CONTEXT_DATE, ' dd-mm-yyyy "")

    ;

    v_stats_5d_1 "TMP_STATS_5D_1" % rowtype;

    BEGIN

    -Insert subquery data into an empty table

    OPEN c_stats_5d_1.

    LOOP

    SEEK c_stats_5d_1 INTO v_stats_5d_1;

    EXIT WHEN c_stats_5d_1% NOTFOUND;

    INSERT INTO 'TMP_STATS_5D_1 '.

    VALUES (v_stats_5d_1);

    END LOOP;

    END CREATE_STATS_5D;

    END PKG_RISK_MONITOR;

    /

    DISPLAY ERRORS

    THX. Managed to get there in the end:

    CREATE OR REPLACE PACKAGE IN THE PKG_RISK_MONITOR

    PROCEDURE CREATE_STATS_5D)

    P_CONTEXT_DATE IN VARCHAR2

    );

    END PKG_RISK_MONITOR;

    /

    CREATE OR REPLACE PACKAGE BODY PKG_RISK_MONITOR AS

    PROCEDURE CREATE_STATS_5D)

    P_CONTEXT_DATE IN VARCHAR2

    )

    IS

    l_ct NUMBER;

    v_sql VARCHAR2 (1000);

    BEGIN

    -Determine whether the table exists.

    Select count (*) in l_ct

    from user_tables

    where table_name = 'TMP_STATS_5D_1 ';

    -Remove the table if it exists.

    If l_ct = 1 then

    run immediately "drop table TMP_STATS_5D_1;

    end if;

    v_sql: = q'[CREATE TABLE 'TMP_STATS_5D_1' AS

    SELECT m.client_id,

    m.client_name,

    Sum (d.created_transactions_number) AS sum_created_trx_number,

    Sum (d.created_refunds_number) AS sum_created_refunds_number,

    Sum(d.created_transactions_value * conversion_rate) AS created_trx_eur_value,

    d.processing_date

    M 'MIND_ACCOUNTS '.

    INNER JOIN 'DATA' m.account_id d = d.merchant_cid

    INNER JOIN 'CURRENCY_CONVERSION' c ON d.currency = c.currency

    WHERE (d.processing_date > = To_date ('] '))

    || P_CONTEXT_DATE |

    q'[(', ' dd-mm-yyyy') (-4) AND d.processing_date]<=>

    || P_CONTEXT_DATE |

    q'[',' dd-mm-yyyy ")"]

    GROUP OF m.client_id, m.client_name, d.processing_date] ";

    immediately run v_sql;

    END CREATE_STATS_5D;

    END PKG_RISK_MONITOR;

    /

    DISPLAY ERRORS

  • Create the trigger to insert data from one user to another user in same Databas

    Dear Sir, I created a trigger as follows

    CREATE OR REPLACE TRIGGER TRIGGER1
    BEFORE INSERTING
    ON table1
    FOR EACH LINE
    BEGIN
    INSERT IN THE TEST. TABLE2
    VALUES (: NEW.) COLUMN1,: NEW. COLUMN2,: NEW. COLUMN3,: NEW. COLUMN4);
    END;
    /

    I want here to insert my user to user Test data. In this Situation when I Execute The above Trigger it shows error PL/SQL: ORA-00942: table or view does not exist

    Help, please

    What do you mean by run the trigger?
    Do you compile?
    Can be open as a TEST and do the following and try to compile your code of the trigger again.

    grant insert on TEST.TABLE2 to youruser;
    

    See you soon,.
    Manik.

  • Inserting data from the user-defined Type

    Hi all

    I have the following type
    create or replace type answer_obj is object (all_employee_seq integer,questionseq varchar2(10),text_answer varchar2(4000),optionseq varchar2(10));
    
    create or replace type answer_tbl is table of answer_obj;
    I have the procedure (within a package) that pulls in the python papers.
    TYPE answer_tbl_type IS TABLE OF question_answer%ROWTYPE
                                   INDEX BY PLS_INTEGER;
    
    PROCEDURE submit_survey (p_answers IN OUT answer_tbl)
       IS
          l_answers_tbl   answer_tbl_type;
       BEGIN
          FOR i IN p_answers.FIRST .. p_answers.LAST
          LOOP
             l_answers_tbl (i).all_employee_seq := p_answers (i).all_employee_seq;
             l_answers_tbl (i).questionseq := p_answers (i).questionseq;
             l_answers_tbl (i).text_answer := p_answers (i).text_answer;
             l_answers_tbl (i).optionseq := p_answers (i).optionseq;
          END LOOP;
    
    
          FORALL idx IN l_answers_tbl.FIRST .. l_answers_tbl.LAST
             INSERT INTO QUESTION_ANSWER
                  VALUES l_answers_tbl (idx);
       
       END;
    My question is, is it better to insert the data directly from the (record) (records) argument using for LOOP INSERT or the conversion of the argument in an associative array and a FORALL?
    As you can see, it's a FOR LOOP to set the values in the array and then by the FORALL.

    I think the above is even faster because of the first LOOP IS done in memory and real integration is carried out with FORALL.
    I want to get as many opinions.


    See you soon,.
    Joel

    Hello

    Because you created the SQL Types, what just to do this within your procedure?

    INSERT INTO QUESTION_ANSWER (all_employee_seq, questionseq, text_answer, optionseq)
    SELECT all_employee_seq, questionseq, text_answer, optionseq
    FROM TABLE(p_answers);
    
  • Insert data from a field in another field in another table


    I am trying to copy the records from the source table

    in the dgpercentagedatachart table

    the domain name is feederid

    So that's what I came:

    INSERT INTO dgpercentagedatachart (feederid)

    Select source.feederid

    Of the source;

    This is the error I get

    Error from the 1 in the command line:

    INSERT INTO dgpercentagedatachart (feederid)

    Select feederid

    Source

    Error report:

    SQL error: ORA-01400: cannot insert NULL into ("GISELECTRIC". "" "" DGPERCENTAGEDATACHART '. "" OBJECTID')

    01400 00000 - "impossible to insert a NULL value in (%s)."

    I check that the two fields accept the NULL value, and they both said YES.

    What can I do?

    Excellent example. I get it.

    But, how can I put the id of object with it?

    Object_Id is the feeder_id # unique

    You can question him in the same table:

    INSERT INTO dgpercentagedatachart (feederid, objectid)

    Select source.feederid, source.objectid

    Of the source;

  • Import/insert data from XML in Oracle database tables?

    Hello. (I use 10.1.3.3.0 JDeveloper and Oracle 10 g)

    I was able to export the data of one of my tables in the database using a View object and .writeXML.

    Now, I want to take an xml file that is formatted just like what is spit out by the writeXML and put this info in my database table. I followed the examples online, and have tried to use .readXML as follows:

    Element = XMLDoc.getDocumentElement ();

    vo.readXML (element,-1);

    I know that it's the kind of work, because at first, I got an error message that one of the required attributes was missing. So, I added this attribute in my xml file and run my code. No errors. But, I checked my database, and new records have been added.

    Is there something I did wrong? Or is it maybe something I left out? I also noticed that there are several versions of readXML as readFromXML. Which should I use and how?

    Thank you.

    Hello

    Example of work is completely: http://kuba.zilp.pl/?id=461

    Kuba

  • Need assistance to migrate data from XML to oracle table.

    Hey Odie,

    Im trying to insert data from an xml file into a table.

    My XML file is as follows.

    <? XML version = "1.0" encoding = "UTF-8" standalone = 'yes' ?>

    - < TransferXML >

    < BatchName > HJ69240 < / BatchName >

    < BatchStatus > Park < / BatchStatus >

    - < SubBatch >

    < SubBatchName > UQ80288 < / SubBatchName >

    < SubBatchStatus > project < / SubBatchStatus >

    - < SubBatchDetail >

    < Ingredient > I3308 < / > of theingredient

    < DispensedQty > 0,0 < / DispensedQty >

    < MDispensedQty > 4.0 < / MDispensedQty >

    < / SubBatchDetail >

    - < SubBatchDetail >

    < Ingredient > I3261 < / > of theingredient

    < DispensedQty > 0,0 < / DispensedQty >

    < MDispensedQty > 3.5 < / MDispensedQty >

    < / SubBatchDetail >

    - < SubBatchDetail >

    < Ingredient > I3235 < / > of theingredient

    < DispensedQty > 0,0 < / DispensedQty >

    < MDispensedQty > 0,5 < / MDispensedQty >

    < / SubBatchDetail >

    - < SubBatchDetail >

    < Ingredient > I3142 < / > of theingredient

    < DispensedQty > 0,0 < / DispensedQty >

    < MDispensedQty > 0,2 < / MDispensedQty >

    < / SubBatchDetail >

    </SubBatch>

    - < SubBatch >

    < SubBatchName > ZB97913 < / SubBatchName >

    < SubBatchStatus > incomplete < / SubBatchStatus >

    - < SubBatchDetail >

    < Ingredient > I3309 < / > of theingredient

    < DispensedQty > 0,75 < / DispensedQty >

    < MDispensedQty > 0,0 < / MDispensedQty >

    < / SubBatchDetail >

    - < SubBatchDetail >

    < Ingredient > I3436 < / > of theingredient

    < DispensedQty > 0,0 < / DispensedQty >

    < MDispensedQty > 0,05 < / MDispensedQty >

    < / SubBatchDetail >

    </SubBatch>

    <Final>false</Final>

    < / TransferXML >



    With the help of your previous posts I've migrated data from this xml file in a table that works perfectly well. But these data repeats instead of giving 6 lines that his return 12 lines guide please.


    CREATE TABLE XXBATCH AS

    SELECT A.BatchName, A.BatchStatus, B.SubBatchName, B.SubBatchStatus, C.Ingredient, C.DispensedQty, C.MDispensedQty, A.FINAL

    OF (XMLTable ('/ TransferXML'))

    from xmltype)

    BFILENAME('APPS_DATA_FILE_DIR','HJ69240.) XML')

    nls_charset_id ('AL32UTF8')

    ) COLUMNS

    BatchName VARCHAR2 path (99) "BatchName.

    , Path of the BatchStatus VARCHAR2 (999) "BatchStatus.

    Path VARCHAR2 (99) final 'Final')),

    (XMLTable ('/ TransferXML/SubBatch '))

    from xmltype)

    BFILENAME('APPS_DATA_FILE_DIR','HJ69240.) XML')

    nls_charset_id ('AL32UTF8')

    ) COLUMNS

    Path of SubBatchName VARCHAR2 (99) "SubBatch/SubBatchName".

    , Path of the SubBatchStatus VARCHAR2 (99) "SubBatch/SubBatchStatus".

    (B)

    (XMLTable ('/ TransferXML/SubBatch/SubBatchDetail '))

    from xmltype)

    BFILENAME('APPS_DATA_FILE_DIR','HJ69240.) XML')

    nls_charset_id ('AL32UTF8')

    ) COLUMNS

    Path of the ingredient VARCHAR2 (99) SubBatchDetail/ingredient"."

    , Path of the DispensedQty VARCHAR2 (99) "SubBatchDetail/DispensedQty".

    , Path of the MDispensedQty VARCHAR2 (99) "SubBatchDetail/MDispensedQty".

    (C)

    I didn't test your query, but apparently it's because you have access to the same file three times instead of spend one XMLTable to another correlated nested groups.

    Better, this should work:

    SELECT A.BatchName

    A.BatchStatus

    B.SubBatchName

    B.SubBatchStatus

    C.Ingredient

    C.DispensedQty

    C.MDispensedQty

    A.FINAL

    FROM XMLTable ('/ TransferXML')

    PASSAGE xmltype (bfilename('TEST_DIR','HJ69240.xml'), nls_charset_id ('AL32UTF8'))

    Path of COLUMNS BatchName VARCHAR2 (99) "BatchName.

    , Path of the BatchStatus VARCHAR2 (999) "BatchStatus.

    , Path VARCHAR2 (99) final "Final."

    , Path of XMLTYPE «SubBatch» SubBatchList

    ) AT

    , XMLTable ('/ SubBatch')

    PASSAGE SubBatchList

    Path of COLUMNS SubBatchName VARCHAR2 (99) "SubBatchName".

    , Path of the SubBatchStatus VARCHAR2 (99) "SubBatchStatus".

    , Path of XMLTYPE «SubBatchDetail» SubBatchDetailList

    ) B

    , XMLTable ('/ SubBatchDetail')

    PASSAGE SubBatchDetailList

    Path VARCHAR2 (99) ingredient of COLUMNS "Ingredient."

    , Path of the DispensedQty VARCHAR2 (99) "DispensedQty".

    , Path of the MDispensedQty VARCHAR2 (99) "MDispensedQty".

    ) C

    ;

    Post edited by: odie_63

Maybe you are looking for

  • PCMATIC is compatible with Firefox?

    I had a problem with my Yahoo.com email and technical support recommended I have Google Chrome, which now inudates me with popups and is not acceptable. About 3 months ago I signed up with PC Matic my virus protection and I want to go back to Mozilla

  • HP Deskjet 3050 a does not connect to Internet

    Currently have the printer on a wireless network with a static IP address.  Able to print from all computers and webscan is active.  I can't get Eprint and Web Services to work?  If you have any ideas or the questions more please let me know. Informa

  • CUDA Matrix Multiplication fails

    Hello I am trying to expedite my application by moving some operations of heavy matrix on the GPU. Given that I have never created a block diagram to run on the GPU to date, I did a simple example to see how things work. The screenshot of the VI I wr

  • Compaq Presario CQ62 fan running full speed but not overheating

    Hello everyone, Ihad a fear a while ago and I was freaked out. I only am not much with the material so I came to you all. I had absolutely nothing on except a browser and youtube. There is no intensive program or anything running in the background wh

  • [Suggestion] Words of support?

    Hello everyone, I am a new user, so do not be angry with me. The Walkman player is great, I agree, but missing one thing I had without any addons on my old Nokia 500 (Symbian Belle!) - words of support. It would be great if you could upgrade the read