problem with the insert statement

Hi all

I'm trying to insert data into xxops_forecast_extract.
There are two additional territory_id, position_id columns.
How can I insert data into xxops_forecast_extract with the update instructions below.
       Columns of XXOPS_FORECAST_EXTRACT 

        PERIOD_ORDER,           
        SHR_NODE_ID,         
        FORECAST_DEFN_ID,       
        X_SALES_REP_NUM,        
        X_SALES_REP_REF,        
        POSITION_NAME,          
        TERRITORY_NAME,         
        AM_ID,              
        POSITION_LEVEL,         
        FORECAST_ID,            
        PERIOD_ID,              
        FISCAL_PERIOD,         
        PERIOD_START_DATE,      
        PERIOD_END_DATE,        
        TOTAL_COMMIT_PRODUCT,   
        TOTAL_JUDGMENT_PRODUCT,
        TOTAL_COMMIT_SERVICE,   
        TOTAL_JUDGMENT_SERVICE,
        TOTAL_UPSIDE_PRODUCT,   
        TOTAL_UPSIDE_SERVICE, 
        TERRITORY_ID,
        POSITION_ID
    INSERT INTO xxfdev.xxops_forecast_extract(
        PERIOD_ORDER,           
        SHR_NODE_ID,         
        FORECAST_DEFN_ID,       
        X_SALES_REP_NUM,        
        X_SALES_REP_REF,        
        POSITION_NAME,          
        TERRITORY_NAME,         
        AM_ID,              
        POSITION_LEVEL,         
        FORECAST_ID,            
        PERIOD_ID,              
        FISCAL_PERIOD,         
        PERIOD_START_DATE,      
        PERIOD_END_DATE,        
        TOTAL_COMMIT_PRODUCT,   
        TOTAL_JUDGMENT_PRODUCT,
        TOTAL_COMMIT_SERVICE,   
        TOTAL_JUDGMENT_SERVICE,
        TOTAL_UPSIDE_PRODUCT,   
        TOTAL_UPSIDE_SERVICE )
    SELECT 
        PERIOD_ORDER,           
        NODE_REFERENCE,         
        FORECAST_DEFN_ID,       
        X_SALES_REP_NUM,        
        X_SALES_REP_REF,        
        POSITION_NAME,          
        TERRITORY_NAME,         
        AM_NAME1,               
        POSITION_LEVEL,         
        FORECAST_ID,            
        PERIOD_ID,              
        FISCAL_PERIOD,          
        PERIOD_START_DATE,      
        PERIOD_END_DATE,        
        TOTAL_COMMIT_PRODUCT,   
        TOTAL_JUDGMENT_PRODUCT,
        TOTAL_COMMIT_SERVICE,   
        TOTAL_JUDGMENT_SERVICE,
        TOTAL_UPSIDE_PRODUCT,   
        TOTAL_UPSIDE_SERVICE   
    FROM ESALESFCST.OMF_FORECAST_DATA_FDEV@XXG2C_ECRMS_FDEV_ADMIN.COMPANY.COM;

      
     UPDATE xxops_forecast_extract b SET territory_id = (SELECT a.territory_id
         FROM fdev_hier_node_mv a
         WHERE a.shr_node_id = b.shr_node_id
          AND NVL(end_dt,SYSDATE) > SYSDATE) ;
    COMMIT; 
    
    UPDATE xxops_forecast_extract b SET position_id = (SELECT a.row_id 
        FROM s_postn a
        WHERE a.name = 'TD-'||UPPER(b.am_id))
        WHERE position_level = 7
        AND b.am_id IS NOT NULL; 
    COMMIT; 
    
    UPDATE xxops_forecast_extract b SET position_id = (SELECT a.row_id
        FROM s_postn a
        WHERE UPPER(a.desc_text) = UPPER(TRIM(B.POSITION_NAME)))
        WHERE position_level = 7
        AND b.am_id IS NULL;
    COMMIT;
Thanks in advance.

You can try with the merger?

Tags: Database

Similar Questions

  • Help with the insert statement

    Hello

    I was wondering if someone could help write me a sql statement.

    Here is my table:
    CREATE TABLE "TEMP_INVOICE" 
       ("INVOICE" VARCHAR2(100 BYTE),
         "DATE_OF_DOCUMENT" DATE, 
         "DATE_OF_PAY_DAY" DATE, 
         "D" NUMBER, 
         "K" NUMBER
       );
    Here are the instructions for correct insertion. This time, I posted 2 examples with 2 numbers different otherwise.
    insert into temp_invoice (invoice,DATE_OF_DOCUMENT,DATE_OF_PAY_DAY,d,k)  values (1000,to_date('01.02.2012','dd.mm.yyyy'),to_date('01.03.2012','dd.mm.yyyy'),5000,0);
     
    insert into temp_invoice (invoice,DATE_OF_DOCUMENT,DATE_OF_PAY_DAY,d,k)  values (1000,to_date('01.04.2012','dd.mm.yyyy'),'','',1000);
     
    insert into temp_invoice (invoice,DATE_OF_DOCUMENT,DATE_OF_PAY_DAY,d,k)  values (1000,to_date('01.05.2012','dd.mm.yyyy'),'','',3000);
     
    insert into temp_invoice (invoice,DATE_OF_DOCUMENT,DATE_OF_PAY_DAY,d,k)  values (1000,to_date('01.06.2012','dd.mm.yyyy'),'','',1000);
    
    insert into temp_invoice (invoice,DATE_OF_DOCUMENT,DATE_OF_PAY_DAY,d,k)  values (2000,to_date('01.07.2012','dd.mm.yyyy'),to_date('01.09.2012','dd.mm.yyyy'),8000,0);
     
    insert into temp_invoice (invoice,DATE_OF_DOCUMENT,DATE_OF_PAY_DAY,d,k)  values (2000,to_date('01.10.2012','dd.mm.yyyy'),'','',5000);
     
    insert into temp_invoice (invoice,DATE_OF_DOCUMENT,DATE_OF_PAY_DAY,d,k)  values (2000,to_date('01.11.2012','dd.mm.yyyy'),'','',2000);
     
    insert into temp_invoice (invoice,DATE_OF_DOCUMENT,DATE_OF_PAY_DAY,d,k)  values (2000,to_date('01.12.2012','dd.mm.yyyy'),'','',1000);
    I want to do is make an insert allows you to table another call is MADE:
    CREATE TABLE "INVOICE" 
       ("INVOICE" VARCHAR2(100 BYTE),
        "DATE_OF_DOCUMENT" DATE, 
         "DATE_OF_PAY_DAY" DATE,
         "DATE_OF_PAYMENT_REC" DATE,
         "VALUE" NUMBER,
         "VALUE_DEDUCT" NUMBER,
        "DATE_FROM" DATE,     
         "DATE_TO" DATE
         );
    Statements in the INVOICE table should be like this:


    ........ The Bill... date_of_document... date_of_pay_day... date_of_payment_rec... value... value_deduct... Date_from... Date_to
    1......     1000...............1.1.2012.................1.3.2012................NULL............................ 5000... NULL... 1.3.2012...1.4.2012
    2......     1000...............1.4.2012.................NULL..................... 1.4.2012...1000... 4000... 2.4.2012... 1.5.2012
    3......     1000...............1.5.2012.................NULL..................... 1.5.2012...3000... 1000... 2.5.2012... 1.6.2012
    4......     1000...............1.6.2012.................NULL..................... 1.6.2012...1000


    Can someone help me with the sql statement that would insert data from table to table Bill temp_invoice as in the example?

    Thank you!

    PS

    I would try to explain.
    (1) the first statement that is to be inserted is original imply that at which is different DATE_OF_PAY_DAY to NULL.
    To this inserted negative of the original imply, we must add date_from that is exatly the same date_of_pay_day and date_to which is exactly the same as the date of the first payment. Payment which came first!
    (2) we have now in the second insert statement. It will be the first payment of lease with date_of_document and date_pf_payment_rec, which is the same as date_fo_document. Value field will be populated with the amount of payment received and value_deduct field will be the value of the original imply - value of the first payment. Date is date_of_document + 1 and date_to is the date of the next payment.
    (3) Insert us the next installment. Date_od_payment_rec is the same as date_of_document... value is the amount of the second payment and value_deduct's previous value_deduct which was of 4000 - value of this second payment. date_from date_of_payment_rec + 1 and date_to is the date of the next payment

    So we continue this same pattern until we reached the final payment when we finish insert with the statement:
    Date of the document (date of the last payment received) and even for date_of_payment_rec and field value with the amount of the payment receieved. The rest (value_deduct, date_from, date_to) is null.

    I really hope you understand what I'm trying to do here.

    If you have any other questions please.

    Published by: user13071990 on November 22, 2012 04:16

    Published by: user13071990 on November 22, 2012 04:16

    Hello

    user13071990 wrote:
    ... Here are the instructions for correct insertion. This time, I posted 2 examples with 2 numbers different otherwise.

    Ok!
    Be sure to post the results you want new data.

    You probably need to add "PARTITION BY the Bill" to all analytical clauses in my solution:

    INSERT INTO invoice
    ( invoice, date_of_document, date_of_pay_day, date_of_payment_rec
    , value,   value_deduct,     date_from,           date_to
    )
    SELECT       invoice
    ,       date_of_document
    ,       date_of_pay_day
    ,       CASE
               WHEN  k > 0
               THEN  date_of_document
           END          AS date_of_payment_rec
    ,       NVL (d, k)     AS value
    ,       NVL2 ( date_of_pay_day
                , NULL
                , SUM (d) OVER ( PARTITION BY  invoice
                                          ORDER BY      date_of_document
                         )
                - SUM (k) OVER ( PARTITION BY  invoice
                                          ORDER BY      date_of_document
                         )
                )     AS value_deduct
    ,       NVL ( date_of_pay_day
               , date_of_document + 1
               )          AS date_from
    ,       LEAD (date_of_document) OVER ( PARTITION BY  invoice
                                            ORDER BY      date_of_document
                               )
                          AS date_to
    FROM       temp_invoice
    ;
    

    Because I'm not an English speaker nativ, that I just posted what it should look like after the insert is successful.

    OK, so you can't explain as you want, but you still need to explain.

    ... @Frank Kulash: you are very close, but still not quite what I'm looking for.

    Point out where my solution is the production of incorrect results, and explain (as you can) how to get good results in these places.

  • Need help with the insert statement

    Hello

    I have a question on how to write a SQL statement.

    This is the table of "base":
    CREATE TABLE TEMP_TBL
    (
    id_nr NUMBER,
    DATE_DOK DATE,
    DATE_DUE DATE,
    DATE_DOK_PAY DATE,
    DEB NUMBER,
    KRD NUMBER
    );
    
    insert into temp_tbl (ID_NR,DATE_DOK,DATE_DUE,DATE_DOK_PAY,DEB,KRD)values('1',TO_DATE('11.01.2011','DD.MM.YYYY'),TO_DATE('25.02.2011','DD.MM.YYYY'),NULL,'423,24','0');
    insert into temp_tbl(ID_NR,DATE_DOK,DATE_DUE,DATE_DOK_PAY,DEB,KRD)values('2',TO_DATE('16.12.2011','DD.MM.YYYY'),TO_DATE('13.06.2011','DD.MM.YYYY'),NULL,'91270,15','0');
    insert into temp_tbl(ID_NR,DATE_DOK,DATE_DUE,DATE_DOK_PAY,DEB,KRD)values('3',TO_DATE('27.09.2011','DD.MM.YYYY'),TO_DATE('27.09.2011','DD.MM.YYYY'),NULL,'0','2000');
    and it comes to resoult in the target table. SQL statement must take care of the insert in a base of the target table table (example below is already provided with test data).
    create table table_sod
    (
    
          id_nr number
         ,date_from date
         ,date_to date
         ,deb_krd number
    
    );
    
    One thing to note here :  values in column deb_krd under insert 1 and 4 must be summarized in insert 4.
    
    insert into table_sod (id_nr,date_from,date_to,deb_krd) values('1',null,to_date('25.02.2011','dd.mm.yyyy'),'423,24');
    insert into table_sod(id_nr,date_from,date_to,deb_krd) values('2',to_date('26.02.2011','dd.mm.yyyy'),to_date('13.06.2011','dd.mm.yyyy'),'423,24');
    insert into table_sod(id_nr,date_from,date_to,deb_krd)values('3',null,to_date('13.06.2011','dd.mm.yyyy'),'91270,15');
    insert into table_sod(id_nr,date_from,date_to,deb_krd)values('4',to_date('14.06.2011','dd.mm.yyyy')to_date('27.09.2011','dd.mm.yyyy'),'91693,39');
    insert into table_sod(id_nr,date_from,date_to,deb_krd)values('5',null,to_date('27.09.2011','dd.mm.yyyy'),'2000');
    If someone could give me a helping hand how write correct insert statement I would be really gratefull.

    Thank you for your time!

    I came here with my own assumptions with this

    SQL> select rownum id_nr
      2       , date_from
      3       , date_to
      4       , case when date_from is null then deb
      5              else sum(case when date_from is not null then deb else 0end) over(order by id_nr, no)
      6         end deb_krd
      7    from (
      8            select id_nr
      9                 , case when lg_dt is null or ld_dt = date_due then  null else lg_dt+1 end date_from
     10                 , ld_dt date_to
     11                 , case when deb = 0 then krd else deb end deb
     12                 , no
     13              from (
     14                      select t1.*
     15                           , lead(t1.date_due) over(order by t1.id_nr, t2.no) ld_dt
     16                           , lag(t1.date_due) over(order by t1.id_nr, t2.no) lg_dt
     17                           , t2.no
     18                        from temp_tbl t1
     19                       cross
     20                       join (select 1 no from dual union all select 2 no from dual) t2
     21                       order by id_nr, no
     22                   )
     23             where ld_dt is not null
     24         )
     25  /
    
         ID_NR DATE_FROM DATE_TO      DEB_KRD
    ---------- --------- --------- ----------
             1           25-FEB-11      42324
             2 26-FEB-11 13-JUN-11      42324
             3           13-JUN-11    9127015
             4 14-JUN-11 27-SEP-11    9169339
             5           27-SEP-11       2000
     
    
  • High logical reads with the INSERT statement

    Hello

    I have an INSERT query that is having a very high reading statspack logical reads. I've seen go Asktom announcement that this is due to the index. Link: [http://asktom.oracle.com/pls/asktom/f?p=100:11:0:P11_QUESTION_ID:6643159615303]

    Can you please help to explain exactly what Oracle do and why you should read so the e/s logic. It's the that oracle must read the structure of the index for all (bundle branch block + all blocks of sheet) for each insertion line?

    Thanks & appreciate the insight.

    Rgds
    Ung

    Only 5 bound for first INSERTION and only 1 for the next INSERTION.

    This is false.

    "db block ' is ALSO to the e/s logic." This is gets them in CURRENT mode. Oracle reads the Index blocks in the current mode to update the index blocks.

    Your last statement is in direct contradiction with the previous paragraph

    As Tom mentioned, oracle must change the index as well when records are inserted in > (or updated or deleted from) the table. This means oracle must first read the index blocks (in > compatibility mode (LIO) as well as in current mode) in addition to the blocks of the turntable when inserting new > records. So this must explain why LIOs are more when inserting in an indexed table from > inserting into a table not indexed.

    What is correct.

    Hemant K Collette
    http://hemantoracledba.blogspot.com

  • Have problems with the insertion of a hyperlink in my flash with Adobe Flash CC banner

    Hi all

    have the following problem: you create a file, .fla with Adobe Flash CC (banner, consisting of six sequenced images). I want to insert a link, but does not work the clickin. What code AS3, I have to insert, if the banner is called "banner" and the link is http://www.adobe.com? (I need to another link, just for example)? I need to click on the pictures that follow after another to come on the site I want to connect it.

    Many thanks in advance,

    Kind regards

    Ruth

    How did you assign the name of the instance to the banner?  Instance names are assigned by selecting the object on the stage, and then by entering the name in the properties panel where it says .   If you happen to animate the banner before the framework where you assign the code itself, you must assign the name of all previous key frames, where the object of the banner is as well.

  • Problem with the MERGE statement

    Hi all

    We'll cover the following:

    create table xx_test1 (invoice_id number, line_group_number number, LINE_TYPE_LOOKUP_CODE          VARCHAR2(25) ,LINE_NUMBER                    NUMBER(15)  );
    

    Insert into XX_TEST1 (INVOICE_ID,LINE_GROUP_NUMBER,LINE_TYPE_LOOKUP_CODE,LINE_NUMBER) values (131549,1,'ITEM',null);
    Insert into XX_TEST1 (INVOICE_ID,LINE_GROUP_NUMBER,LINE_TYPE_LOOKUP_CODE,LINE_NUMBER) values (131549,1,'TAX',null);
    Insert into XX_TEST1 (INVOICE_ID,LINE_GROUP_NUMBER,LINE_TYPE_LOOKUP_CODE,LINE_NUMBER) values (131549,2,'ITEM',null);
    Insert into XX_TEST1 (INVOICE_ID,LINE_GROUP_NUMBER,LINE_TYPE_LOOKUP_CODE,LINE_NUMBER) values (131549,2,'TAX',null);
    Insert into XX_TEST1 (INVOICE_ID,LINE_GROUP_NUMBER,LINE_TYPE_LOOKUP_CODE,LINE_NUMBER) values (131549,3,'ITEM',null);
    Insert into XX_TEST1 (INVOICE_ID,LINE_GROUP_NUMBER,LINE_TYPE_LOOKUP_CODE,LINE_NUMBER) values (131549,3,'TAX',null);
    Insert into XX_TEST1 (INVOICE_ID,LINE_GROUP_NUMBER,LINE_TYPE_LOOKUP_CODE,LINE_NUMBER) values (131549,4,'ITEM',null);
    Insert into XX_TEST1 (INVOICE_ID,LINE_GROUP_NUMBER,LINE_TYPE_LOOKUP_CODE,LINE_NUMBER) values (131549,4,'TAX',null);
    Insert into XX_TEST1 (INVOICE_ID,LINE_GROUP_NUMBER,LINE_TYPE_LOOKUP_CODE,LINE_NUMBER) values (131549,5,'ITEM',null);
    Insert into XX_TEST1 (INVOICE_ID,LINE_GROUP_NUMBER,LINE_TYPE_LOOKUP_CODE,LINE_NUMBER) values (131549,5,'TAX',null);
    Insert into XX_TEST1 (INVOICE_ID,LINE_GROUP_NUMBER,LINE_TYPE_LOOKUP_CODE,LINE_NUMBER) values (131549,12,'ITEM',null);
    Insert into XX_TEST1 (INVOICE_ID,LINE_GROUP_NUMBER,LINE_TYPE_LOOKUP_CODE,LINE_NUMBER) values (131549,12,'TAX',null);
    Insert into XX_TEST1 (INVOICE_ID,LINE_GROUP_NUMBER,LINE_TYPE_LOOKUP_CODE,LINE_NUMBER) values (131549,7,'ITEM',null);
    Insert into XX_TEST1 (INVOICE_ID,LINE_GROUP_NUMBER,LINE_TYPE_LOOKUP_CODE,LINE_NUMBER) values (131549,7,'TAX',null);
    Insert into XX_TEST1 (INVOICE_ID,LINE_GROUP_NUMBER,LINE_TYPE_LOOKUP_CODE,LINE_NUMBER) values (131549,8,'ITEM',null);
    Insert into XX_TEST1 (INVOICE_ID,LINE_GROUP_NUMBER,LINE_TYPE_LOOKUP_CODE,LINE_NUMBER) values (131549,8,'TAX',null);
    Insert into XX_TEST1 (INVOICE_ID,LINE_GROUP_NUMBER,LINE_TYPE_LOOKUP_CODE,LINE_NUMBER) values (131549,9,'ITEM',null);
    Insert into XX_TEST1 (INVOICE_ID,LINE_GROUP_NUMBER,LINE_TYPE_LOOKUP_CODE,LINE_NUMBER) values (131549,9,'TAX',null);
    Insert into XX_TEST1 (INVOICE_ID,LINE_GROUP_NUMBER,LINE_TYPE_LOOKUP_CODE,LINE_NUMBER) values (131549,10,'ITEM',null);
    Insert into XX_TEST1 (INVOICE_ID,LINE_GROUP_NUMBER,LINE_TYPE_LOOKUP_CODE,LINE_NUMBER) values (131549,10,'TAX',null);
    Insert into XX_TEST1 (INVOICE_ID,LINE_GROUP_NUMBER,LINE_TYPE_LOOKUP_CODE,LINE_NUMBER) values (131549,11,'ITEM',null);
    Insert into XX_TEST1 (INVOICE_ID,LINE_GROUP_NUMBER,LINE_TYPE_LOOKUP_CODE,LINE_NUMBER) values (131549,11,'TAX',null);
    Insert into XX_TEST1 (INVOICE_ID,LINE_GROUP_NUMBER,LINE_TYPE_LOOKUP_CODE,LINE_NUMBER) values (131549,12,'ITEM',null);
    Insert into XX_TEST1 (INVOICE_ID,LINE_GROUP_NUMBER,LINE_TYPE_LOOKUP_CODE,LINE_NUMBER) values (131549,12,'TAX',null);
    Insert into XX_TEST1 (INVOICE_ID,LINE_GROUP_NUMBER,LINE_TYPE_LOOKUP_CODE,LINE_NUMBER) values (131549,13,'ITEM',null);
    Insert into XX_TEST1 (INVOICE_ID,LINE_GROUP_NUMBER,LINE_TYPE_LOOKUP_CODE,LINE_NUMBER) values (131549,13,'TAX',null);
    Insert into XX_TEST1 (INVOICE_ID,LINE_GROUP_NUMBER,LINE_TYPE_LOOKUP_CODE,LINE_NUMBER) values (131549,14,'ITEM',null);
    Insert into XX_TEST1 (INVOICE_ID,LINE_GROUP_NUMBER,LINE_TYPE_LOOKUP_CODE,LINE_NUMBER) values (131549,14,'TAX',null);
    Insert into XX_TEST1 (INVOICE_ID,LINE_GROUP_NUMBER,LINE_TYPE_LOOKUP_CODE,LINE_NUMBER) values (131549,15,'ITEM',null);
    Insert into XX_TEST1 (INVOICE_ID,LINE_GROUP_NUMBER,LINE_TYPE_LOOKUP_CODE,LINE_NUMBER) values (131549,15,'TAX',null);
    Insert into XX_TEST1 (INVOICE_ID,LINE_GROUP_NUMBER,LINE_TYPE_LOOKUP_CODE,LINE_NUMBER) values (131549,16,'ITEM',null);
    Insert into XX_TEST1 (INVOICE_ID,LINE_GROUP_NUMBER,LINE_TYPE_LOOKUP_CODE,LINE_NUMBER) values (131549,16,'TAX',null);
    Insert into XX_TEST1 (INVOICE_ID,LINE_GROUP_NUMBER,LINE_TYPE_LOOKUP_CODE,LINE_NUMBER) values (131549,17,'ITEM',null);
    Insert into XX_TEST1 (INVOICE_ID,LINE_GROUP_NUMBER,LINE_TYPE_LOOKUP_CODE,LINE_NUMBER) values (131549,17,'TAX',null);
    Insert into XX_TEST1 (INVOICE_ID,LINE_GROUP_NUMBER,LINE_TYPE_LOOKUP_CODE,LINE_NUMBER) values (131549,18,'ITEM',null);
    Insert into XX_TEST1 (INVOICE_ID,LINE_GROUP_NUMBER,LINE_TYPE_LOOKUP_CODE,LINE_NUMBER) values (131549,18,'TAX',null);
    Insert into XX_TEST1 (INVOICE_ID,LINE_GROUP_NUMBER,LINE_TYPE_LOOKUP_CODE,LINE_NUMBER) values (131549,19,'ITEM',null);
    Insert into XX_TEST1 (INVOICE_ID,LINE_GROUP_NUMBER,LINE_TYPE_LOOKUP_CODE,LINE_NUMBER) values (131549,19,'TAX',null);
    Insert into XX_TEST1 (INVOICE_ID,LINE_GROUP_NUMBER,LINE_TYPE_LOOKUP_CODE,LINE_NUMBER) values (131549,20,'ITEM',null);
    Insert into XX_TEST1 (INVOICE_ID,LINE_GROUP_NUMBER,LINE_TYPE_LOOKUP_CODE,LINE_NUMBER) values (131549,20,'TAX',null);
    Insert into XX_TEST1 (INVOICE_ID,LINE_GROUP_NUMBER,LINE_TYPE_LOOKUP_CODE,LINE_NUMBER) values (131549,21,'ITEM',null);
    Insert into XX_TEST1 (INVOICE_ID,LINE_GROUP_NUMBER,LINE_TYPE_LOOKUP_CODE,LINE_NUMBER) values (131549,21,'TAX',null);
    Insert into XX_TEST1 (INVOICE_ID,LINE_GROUP_NUMBER,LINE_TYPE_LOOKUP_CODE,LINE_NUMBER) values (131549,22,'ITEM',null);
    Insert into XX_TEST1 (INVOICE_ID,LINE_GROUP_NUMBER,LINE_TYPE_LOOKUP_CODE,LINE_NUMBER) values (131549,22,'TAX',null);
    Insert into XX_TEST1 (INVOICE_ID,LINE_GROUP_NUMBER,LINE_TYPE_LOOKUP_CODE,LINE_NUMBER) values (131549,23,'ITEM',null);
    Insert into XX_TEST1 (INVOICE_ID,LINE_GROUP_NUMBER,LINE_TYPE_LOOKUP_CODE,LINE_NUMBER) values (131549,23,'TAX',null);
    Insert into XX_TEST1 (INVOICE_ID,LINE_GROUP_NUMBER,LINE_TYPE_LOOKUP_CODE,LINE_NUMBER) values (131549,24,'ITEM',null);
    Insert into XX_TEST1 (INVOICE_ID,LINE_GROUP_NUMBER,LINE_TYPE_LOOKUP_CODE,LINE_NUMBER) values (131549,24,'TAX',null);
    Insert into XX_TEST1 (INVOICE_ID,LINE_GROUP_NUMBER,LINE_TYPE_LOOKUP_CODE,LINE_NUMBER) values (131549,25,'ITEM',null);
    Insert into XX_TEST1 (INVOICE_ID,LINE_GROUP_NUMBER,LINE_TYPE_LOOKUP_CODE,LINE_NUMBER) values (131549,25,'TAX',null);
    

    So, if we want to MERGE this table and update the lines with below:

    merge into xx_test1 DST
             USING (SELECT  LINE_GROUP_NUMBER,
                  LINE_TYPE_LOOKUP_CODE,
                  ROW_NUMBER() over(order by LINE_TYPE_LOOKUP_CODE, LINE_GROUP_NUMBER) as LINE_NUM
             from xx_test1
            where INVOICE_ID = 131549
           
                 ) SRC
          ON (DST.LINE_GROUP_NUMBER = SRC.LINE_GROUP_NUMBER AND dst.LINE_TYPE_LOOKUP_CODE = src.LINE_TYPE_LOOKUP_CODE AND dst.invoice_id = 131549 )
          WHEN MATCHED THEN
             update
                set DST.LINE_NUMBER = SRC.LINE_NUM
                ;
    


    I get an error message:

    SQL error: ORA-30926: failed to get a stable set of rows in the source tables

    30926 00000 - "impossible to get a stable set of rows in the source tables.

    * Cause: A stable set of rows could not be achieved due to the large dml

    activity or one not deterministic where clause.

    * Action: Remove any non deterministic of the clauses and reissue of the dml.

    I don't know why I'm getting this. Any ideas?

    Version: 11g

    Kind regards

    Alex

    whenever I have this error I convert my fusion in a select to see what is duplication

    select dst.LINE_GROUP_NUMBER, dst.LINE_TYPE_LOOKUP_CODE, count(*)
    from xx_test1 DST
    join (SELECT  LINE_GROUP_NUMBER,
                  LINE_TYPE_LOOKUP_CODE,
                  ROW_NUMBER() over(order by LINE_TYPE_LOOKUP_CODE, LINE_GROUP_NUMBER) as LINE_NUM
             from xx_test1
            where INVOICE_ID = 131549
         ) SRC
     ON (DST.LINE_GROUP_NUMBER = SRC.LINE_GROUP_NUMBER AND dst.LINE_TYPE_LOOKUP_CODE = src.LINE_TYPE_LOOKUP_CODE AND dst.invoice_id = 131549 )
    group by dst.LINE_GROUP_NUMBER, dst.LINE_TYPE_LOOKUP_CODE
    having count(*) > 1
    

    you have 2 dst. LINE_GROUP_NUMBER, summer time. Combination of LINE_TYPE_LOOKUP_CODE this duplication.

  • Problems with the switch statement

    There everyone,

    I tried to build a page with 4 buttons. Each button is a symbol that contains 2 png´2 who are the drawings of the key. If you click on the button 1, he has to move on the screen. If you click it again it should back off. and if you click on another button button1 is active then button1 should return to the starting position and button 2 should come on the screen.

    I use a switch statement and a variable.

    composition ready, I used

    sym.setVariable("current","");

    to set the Variable

    each button (one of the png within the symbols), I used:

    var = sym.getComposition.getStage.getVariable ("current") courses;

    switch (current)

    {

    case ' ':

    SYM. Play ("in");

    break;

    case button1:

    SYM. Play ("out");

    break;

    by default:

    sym.getComposition.getStage.getSymbol (current) ("out") .play;

    SYM. Play ("in");

    break;

    }

    announcement each animation buttons are labels for the entrance and animation. There are also triggers that change the current variable on the stage

    sym.getComposition.getStage.setVariable ("current", "button1");

    If I test inside a browser and click the button nothing happens.

    I m what do not know my mistake.

    can someone help me?

    concerning

    Mr.Monsen

    Hello

    Some errors of syntax in red:

    class var = sym.getComposition () .getStage () .getVariable ("current");

    switch (current)

    {

    case ' ':

    SYM. Play ("in");

    break;

    case "button1":

    SYM. Play ("out");

    break;

    by default:

    sym.getComposition () .getStage () .getSymbol (current) ("out") .play;

    SYM. Play ("in");

    }

    sym.getComposition () .getStage () .setVariable ("current", "button1");

  • Problem with the insertion of Pages

    I have a large PDF (1800 pages) which is a mixture of created acrobat pdf and pdf provided by other companies who can use othe products.

    Everything was ok until Friday when I try to insert 10 pages in the location of the page 1265, when I ask him to insert the document he put the 10 pages futher in the document, which, once I attempt to move this translates their move further down the document.

    No matter what risks what this might be or how fix it

    Thank you

    Mark,

    It sounds as if there is a corruption in the document. If you cannot recreate the document, you can try to refry the document by printing to PDF. Which will result in a lower quality paper, but it doesn't have the error that you have a problem.

  • Problem with the update statement

    Hello

    Can someone tell me please the difference between

    H1. Select s.name, s.id, d.id, d.name in s, d where s.id = d.id;

    and

    H1. Select s.name, s.id, d.id, d.name in s d on s.id = d.id inner join;

    They give me the same result, but I would like to know how it works internally.

    And also

    update source X set name =)
    H3. Select Y.name in the destination Y where X.id = Y.id
    )
    where X.id in (select destination id);

    Is doing an update

    but when

    update source set name =)
    H3. Select Y.name in the destination source Y X on X.id = Y.id inner join
    )
    where X.id in (select destination id);

    using the above query, I get an error message stating "only query returns multiple lines.

    What is the error that I commit here?

    Thanks in advance

    Sana

    Assuming that table destination has PK/UK on id:

    SQL> create table source(id number,name varchar2(10));
    
    Table created.
    
    SQL> insert into source(id) select empno from emp
      2  /
    
    14 rows created.
    
    SQL> create table destination(id number,name varchar2(10));
    
    Table created.
    
    SQL> insert into destination select empno,ename from emp
      2  /
    
    14 rows created.
    
    SQL> commit
      2  /
    
    Commit complete.
    
    SQL> update (select s.id,s.name s_name,d.name d_name from source s inner join destination d on s.id = d.id)
      2  set s_name = d_name
      3  /
    set s_name = d_name
        *
    ERROR at line 2:
    ORA-01779: cannot modify a column which maps to a non key-preserved table
    
    SQL> alter table destination
      2    add constraint destination_pk
      3      primary key(id)
      4  /
    
    Table altered.
    
    SQL> update (select s.id,s.name s_name,d.name d_name from source s inner join destination d on s.id = d.id)
      2  set s_name = d_name
      3  /
    
    14 rows updated.
    
    SQL> select * from source
      2  /
    
            ID NAME
    ---------- ----------
          7369 SMITH
          7499 ALLEN
          7521 WARD
          7566 JONES
          7654 MARTIN
          7698 BLAKE
          7782 CLARK
          7788 SCOTT
          7839 KING
          7844 TURNER
          7876 ADAMS
    
            ID NAME
    ---------- ----------
          7900 JAMES
          7902 FORD
          7934 MILLER
    
    14 rows selected.
    
    SQL> 
    

    SY.

  • Problems with the buttons (on the area of State/Hit)

    The site I'm getting is:

    http://www.RelicRockBand.com

    If you go to the "Biography" section, you'll see four links that work as buttons of reversal.  Now, if you go to the 'Media' section, you will see 6 links that do not appear to react correctly as buttons of reversal.  They fulfill their function, but it is difficult to get the button to appear in its "underline" in the State.  I don't know if it is a problem with the over State, the status of success or another problem with how I built the site.  If you want to take a look at this, go to:

    http://www.uvm.edu/~nmphilli/Relic_Website/Flash/Relic_Webpage.fla

    to get the FLA for the site.  The concerned items are nested as follows: in scene 1, on the content layer, label image 'Media' (frames, 16-21), you will find Media_Fader, where is Media_Content, in which are several buttons, each with getURL actions that are applied to them.  Any help would be fantastic!  Thank you!

    -Nic

    The question always involves using the textfield links.  Remove the textfields in all settings inside the buttons and your problems should go away.

  • OfficeJet 6600 - reports HP Connect "problem with the printer.

    I just bought an all-in-one OfficeJet 6600 and immediately installed on my MacBook Pro. Installation went smoothly, and I used it for scanning and printing. I am very happy. However, I noticed that HP Connect reports "Issue with printer." Well, it worked fine, so I ignored the error and continued to work.

    Tonight, I have installed the printer on a Windows 7 laptop. At HP Connect, it is always now reports "Problem with printer." That's it - no further details and no symptoms of any kind of problem. How to diagnose the 'problem' and how to fix it?

    Hi there, I know this may seem illogical, but I wouldn't worry too much about the problem with the printer State message in connected HP. I saw myself sometimes, and I was able to print successfully from a mobile device to the printer which connected HP indicated that there is a problem. Have you tried to send a job by using either the application mobile ePrint or to the e-mail address of printers for the printer in question?

    On the Windows 7 machine, you can also download and run the HP print and Scan Doctor to confirm there is no problem with the connection to the computer on which is installed the software of the printer or the printer hardware. Be aware, however, that the application is compatible with the Windows operating system only, so you cannot run it on the Mac computer, but unless you are having problems printing from Mac to the printer, there is no reason to suspect that anything is wrong.

    Hope that makes sense, but post comes back with other questions.

    Best.

  • Is possible to write the INSERT statement that fills two columns: 'word' and 'sense' of the file text with multiple lines - in each line is followed word that is the meaning?

    Is possible to write the INSERT statement that fills two columns: 'word' and 'sense' of the file text with multiple lines - in each line is followed word that is the meaning?

    Hello

    2796614 wrote:

    Is possible to write the INSERT statement that fills two columns: 'word' and 'sense' of the file text with multiple lines - in each line is followed word that is the meaning?

    Of course, it is possible.  According to what the text file looks like to, you can create an external table that treats the text file as if it were a table.  Otherwise, you can always read the file in PL/SQL, using the utl_file package and INSERT of PL/SQL commands.

    You have problems whatever you wantt?  If so, your zip code and explain what the problem is.

    Whenever you have any questions, please post a small example of data (CREATE TABLE and only relevant columns, INSERT statements) for all of the tables involved and the exact results you want from these data, so that people who want to help you can recreate the problem and test their ideas.  In this case, also post a small sample of the text involved file.

    If you ask about a DML operation, such as INSERT, then INSERT statements, you post should show what looks like the tables before the DML, and the results will be the content of the table changed after the DML.

    Explain, using specific examples, how you get these results from these data.

    Always say what version of Oracle you are using (for example, 11.2.0.2.0).

    See the FAQ forum: Re: 2. How can I ask a question on the forums?

  • Procedure with the DML statements that insert values from 1 to 100 in only one table and it is matching word equivalent in the other

    Can someone help me create a procedure with the DML statements that insert values from 1 to 100 in a table "abc" and the procedure must connect the numbers into words in another table "xyz" without doing a commit explicitly. "."

    Currently on trial...

    SQL > create table abc (num number);

    Table created.

    SQL > create table xyz (num varchar2 (100));

    Table created.

    SQL > ed
    A written file afiedt.buf

    1. insert all
    2 values of 1 = 1 then in abc (num) (l)
    3 when the values of 1 = 1 then in xyz (num) (to_char (to_date(l,'j'), 'jsp'))
    4 * Select the level from dual connect by level<=>
    SQL > /.

    200 rows created.

    And the result...

    SQL > select * from abc;

    NUM
    ----------
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    ..
    ..
    ..
    98
    99
    100

    100 selected lines.

    SQL > select * from xyz;

    NUM
    ----------------------------------------------------------------------------------------------------
    one
    two
    three
    four
    five
    six
    seven
    eight
    nine
    ten
    Eleven
    twelve
    ..
    ..
    ..
    98
    Nineteen eighty
    Cent

    100 selected lines.

  • Problem with the change of a 'State' the substitution of one break of the chronology of the objects

    Here is my setup: I have a single slide for learning select 9 melodies 'text buttons' to view 9 different definitions.  To do this, I set myself to each buttons to change the "State" of the original image for the introduction of a 'legend of text' containing the definition of that label of buttons.  I also three navigation buttons (output, back and next; button_19 _20 & _21) with breaks built into the end of the timeline. coinciding with the end of the audio narration for this slide.

    Here's my problem: the calendar runs and stops as it should until the learner chooses one of the 'text' buttons after that the timeline is suspended; how it seems to send a command to "continue" and substitutes at the break, and brings the learner to the next slide.

    This has something to do with the function "States"?  I used to do exactly the same thing in Cap 7 with stocks advanced without any problem.

    Thanks in advance for the help.

    v/r

    Jay

    stateTimeline.JPG

    If it's 9 Captivate, locate the box continue a project of play in the Actions section and deselect buttons for each.

  • How do I monitor/find where is the State of my download?  I don't know how long it takes or if there is a problem with the download that I can't find anything.  Also, is it supposed to be an icon for my purchase of Photoshop and light in my apps folder

    How do I monitor/find where is the State of my download?  I don't know how long it takes or if there is a problem with the download that I can't find anything.  Also, is it supposed to be an icon for my purchase of Photoshop and light in my apps folder?  Where can I find that when it's done download?

    Could you please confirm the operating system you are using.

    You can see the status of the application of CC desktop download.

    The CC app desktop click the creative cloud icon located in the taskbar (Windows) or the Apple bar (Mac OS) menu, to open the creative cloud desktop application.

    Hope this will help you.

    Kind regards

    Hervé Khare

Maybe you are looking for

  • Where the place / the field to enter the Web site I want to see from the opening

    I had put Mozilla in place to open the site start.earthlink.net . Now this isn't the case. What hit me out of this framework, and where can I find the dialog box reset to this place?

  • New HP Mini

    I just bought a second HP Mini I think the form/Windows 7 netbook my needs to a T.   I use it much more than my laptop Compaq Presario or one of my pills. My question is what do I do with the new Mini to the death of my current Mini? -Just put it on

  • Can I Update error 80072EFE code

    Hello everone I am gla if I can be helped with this problem. Whenever I tried to update my computer via windows update, I always get this error: 80072EFE and I would appreciate if anyone can help.

  • I want to reset the new product key for my windows

    I have a laptop. I don't have a CD player. MY microsoft in genune software. I also have the product key. but after farmatting he I din't keep my old porduct key.  relax him now system update it says product key is not valid. I want to restore my orig

  • Clone HD over to the new system won't boot to the top

    I'm updating the PC of my church. I cloned the HD with XP Pro OS and moved to the new system. When I did it start. It goes into a loop of reboot. I realize now, the issue has to do with the settings. So, how can I get this to work on the new PC? I wa