Insert all records from a custom to a staging table.

Hello

Is it possible to insert all records of a cursor in a custom table using plsql instead of open a cursor, and each record in a loop?

Thank you

KK

Use INSERT INTO your_staging_tbl... SELECT... Of your_cuatom_tbl

Tags: Database

Similar Questions

  • Insert records from a single to two related tables table

    DB - 10G
    OS - XP

    We have thousands of records delimited by commas that we want to insert in a normalized table structure.

    I created a group of test data that can be found at the end of this post.


    I have csv files that look like this;

    Donald, huey
    Dewey, Donald
    Donald, louie

    And I want that data to be inserted into a table separate two like that;

    table named PARENTS
    parent_name PK
    1 donald

    Table named for CHILDREN
    child_name fk PK
    1 1 huey
    1 2 dewey
    1 3 louie


    I built an insert query that looks like this;

    INSERT ALL
    IN parents (parent_id, parent_name) VALUES (parents_seq.nextval, parent_name)
    IN children (children_id, parent_id, child_name) VALUES (children_seq.nextval, parents_seq.nextval, child_name)
    SELECT parent_name, child_name
    SOURCES;

    And this has resulted in the following:

    Table named PARENTS
    PK child_name
    1 DONALD
    2 DONALD
    3 DONALD

    Table named PARENTS
    child_name fk PK
    1 1 HUEY
    2 2 DEWEY
    3 3 LOUIE

    Anyone have any ideas on how I could accomplish this task?

    This is some sample data;

    [code]
    Parents_seq SEQUENCE DROP;
    Sources_seq SEQUENCE DROP;
    Children_seq SEQUENCE DROP;
    Sources of DROP TABLE.
    DROP TABLE children;
    Parents of DROP TABLE;

    CREATE SEQUENCE PARENTS_SEQ MINVALUE MAXVALUE 1 1000000000000000000000000000 INCREMENT OF 1 START WITH 1 CACHE 20 ALL NOCYCLE.

    CREATE THE PARENTS TABLE
    (THE NUMBER (8) OF PARENT_ID NOT NULL)
    PARENT_NAME VARCHAR2 (50 CHAR) NOT NULL,
    CONSTRAINT PARENTS_PK PRIMARY KEY (PARENT_ID)
    );

    create or replace
    PARENTS_BI RELAXATION
    FRONT
    INSERT OR UPDATE PARENTS
    FOR EACH START OF LINE

    IF THE INSERTION

    IF: NEW. PARENT_ID IS NULL THEN
    SELECT PARENTS_SEQ.nextval IN: NEW. PARENT_ID FROM dual;
    END IF;

    END IF;

    END;
    /


    CREATE SEQUENCE SOURCES_SEQ MINVALUE MAXVALUE 1 1000000000000000000000000000 INCREMENT OF 1 START WITH 1 CACHE 20 ALL NOCYCLE.

    CREATE TABLE SOURCES
    (THE NUMBER (8) OF SOURCE_ID NOT NULL)
    PARENT_NAME VARCHAR2 (50 CHAR) NOT NULL,
    CHILD_NAME VARCHAR2 (50 CHAR) NOT NULL,
    CONSTRAINT SOURCES_PK PRIMARY KEY (SOURCE_ID)
    );

    create or replace
    SOURCES_BI RELAXATION
    FRONT
    INSERT OR UPDATE ON SOURCES
    FOR EACH START OF LINE

    IF THE INSERTION

    IF: NEW. SOURCE_ID IS NULL THEN
    SELECT SOURCES_SEQ.nextval IN: NEW. SOURCE_ID FROM dual;
    END IF;

    END IF;

    END;
    /

    INSERT INTO SOURCES (PARENT_NAME, CHILD_NAME) VALUES ('DONALD', 'HUEY');
    INSERT INTO SOURCES (PARENT_NAME, CHILD_NAME) VALUES ('DONALD', 'DEWEY');
    INSERT INTO SOURCES (PARENT_NAME, CHILD_NAME) VALUES ('DONALD', 'LOUIE');
    Commit;


    CREATE SEQUENCE CHILDREN_SEQ MINVALUE MAXVALUE 1 1000000000000000000000000000 INCREMENT OF 1 START WITH 1 CACHE 20 ALL NOCYCLE.

    FAST * CREATE TABLE *.
    CREATE TABLE CHILDREN
    (CHILDREN_ID NUMBER OF NON-NULL
    , PARENT_ID NUMBER NOT NULL
    CHILD_NAME VARCHAR2 (50 CHAR) NOT NULL,
    CONSTRAINT CHILDREN_PK PRIMARY KEY (CHILDREN_ID)
    );

    create or replace
    CHILDREN_BI RELAXATION
    FRONT
    INSERT OR UPDATE ON CHILDREN
    FOR EACH START OF LINE

    IF THE INSERTION

    IF: NEW. CHILDREN_ID IS NULL THEN
    SELECT CHILDREN_SEQ.nextval IN: NEW. CHILDREN_ID FROM dual;
    END IF;

    END IF;

    END;
    /

    [code]

    Looks like it's a way to do this:

    insert into parents (parent_name) select distinct parent_name from sources;
    
    select *
      from parents;
    PARENT_ID              PARENT_NAME
    ---------------------- --------------------------------------------------
    1                      DONALD
    
    insert into children (parent_id, child_name)
    select p.parent_id, s.child_name
      from sources s
      join parents p
        on (s.parent_name = p.parent_name);
    
    select *
      from children;
    
    CHILDREN_ID            PARENT_ID              CHILD_NAME
    ---------------------- ---------------------- --------------------------------------------------
    1                      1                      HUEY
    2                      1                      DEWEY
    3                      1                      LOUIE
    
  • How replicates all records from one table to another table without using expdp, impdp

    Hi I have two database in a database, that I have a table called t1 and another base data, I have the second table .so, my first table have records, that I need to transfer all records second T2 without use of expdp and impdp in every 5 min... what I do

    ??

    The best solution for this scenario is to use Oracle Golden Gate

    However, it requires a license, and you must pay for it.

    If this is not possible, you can create a job scheduler that uses a link DB in order to reproduce the recordings of the target database, but it will take the entire table to the target database and then INSERT AS SELECT truncate the data of the entire table every time that the job is running (because you can't follow only the records that have been changed or modified).

    In addition, read here on the replication of data using materialized views.

  • How to insert the value from the FORM to another database table?

    Hi all

    I have the following problem.

    I have a form that has a tabular layout for the MATURED_FD_DTLtable. (all about 20 line items)

    CREATE TABLE MATURED_FD_DTL

    (

    ACCT_FD_NO VARCHAR2 (17 BYTE) NOT NULL,

    CUST_CODE NUMBER (9),

    FD_AMT NUMBER (15),

    FD_INT_BAL NUMBER (15),

    TDS NUMBER (15),

    CHQ_NO NUMBER (10),

    CREATED_DATE DATE,

    CREATED_BY VARCHAR2 (15 BYTE),

    PREV_YR_TDS NUMBER (15),

    ADD_FD_AMT NUMBER (15),

    DESCRIPTION VARCHAR2 (100 BYTE),

    P_SAP_CODE NUMBER (10),

    P_TYPE VARCHAR2 (1 BYTE)

    )

    By clicking on 'SAVE' button, all values will be automatically is stored in the MATURED_FD_DTLdatabase table.

    But I want to insert these values in another table called TEMP.

    I want to insert values of form only, no table select.

    How can I do this?

    Help me.

    Is Oracle Designer 6i.

    Answer:

    BEGIN

    Commit_form;

    PREMIER_ENREGISTREMENT;

    LOOP

    insert into TEMP_MATURED_FD_DTL

    SELECT * FROM MATURED_FD_DTL WHERE ACCT_FD_NO =: acct_fd_NO;

    WHEN THE OUTPUT: SYSTEM. LAST_RECORD = "TRUE";

    NEXT_RECORD;

    END LOOP;

    PREMIER_ENREGISTREMENT;

    COMMIT;

    MESSAGE ("RECORD UPDATED AS PAID '");

    MESSAGE (' ', no_acknowledge);

    END;

  • Retrieve all records in the selected master child multi tables

    Hello
    I use JDeveloper 11.1.1.4 version and using ADF - BC in my project.
    I have a one-to-one simple child master [several] in my project.
    In my view page, I display this master child [Ex: EmpVo1-> DeptVo2] in the form of tables.

    I have multi-selection enabled for the main table.
    My requirement is that, on the multi by selecting the lines in the main tables, I want to get all the child records in my grain of support.
    If a master has 3 child records line and another main line has 4 child records and on the selection of several of these two records in the primary table, I should get all the child records in my grain of support.
    I need it to implement the cascade delete feature.
    Here is the sample code coin
    --------------------------------------------

    (1) called on selecting rows in the master table

    {} public void onRSCGrpSelect (SelectionEvent selectionEvent)
    Add the code in the event here...
    ADFUtil.invokeEL ("#{bindings.") RscGroupVO1.collectionModel.makeCurrent} «»
    new class [] {SelectionEvent.class},
    (New Object() {selectionEvent});

    RowKeySet rowKeySet = (RowKeySet) tblRSCGrp.getSelectedRowKeys ();
    CollectionModel cm = (CollectionModel) tblRSCGrp.getValue ();

    for (object facesTreeRowKey: rowKeySet) {}
    cm.setRowKey (facesTreeRowKey);
    RowData = JUCtrlHierNodeBinding
    (JUCtrlHierNodeBinding) cm.getRowData ();
    Line = rowData.getRow ();
    System.out.println ("\n" +)
    row.getAttribute (0) + ":" + row.getAttribute (1) +.
    (":" + row.getAttribute (2));

    System.out.println ("display the child records");
    displayChildRecords (row.getAttribute (0));

    }

    }

    2 private void displayChildRecords (Object rscGrp) {}
    ViewObject rscMapVo = getRscMapViewObj();
    RowSetIterator rsI = rscMapVo.createRowSetIterator (null);
    While (rsI.hasNext ()) {}
    Line = rsI.next ();
    System.out.println ("\n" +)
    row.getAttribute (0) + ":" + row.getAttribute (1) +.
    (":" + row.getAttribute (2));
    }
    rsI.closeRowSetIterator ();
    }

    But the problem is that he is always giving me the last selected lines child details.

    Please suggest the error that I do.

    Thank you
    Praveen

    Your problem is to use makecurrent, which should not be used on a multi selection table. Then, if you have a relationship master detail you should have a view link between them. In this case, you can expose a method as you master to get the related child line. Not need to get the VO itself you can use the accessors of child iterator to obtain registration of the child.

    public void onRSCGrpSelect(SelectionEvent selectionEvent) {
    // Add event code here...
    RowKeySet rowKeySet = (RowKeySet)tblRSCGrp.getSelectedRowKeys();
    CollectionModel cm = (CollectionModel)tblRSCGrp.getValue();
    
    for (Object facesTreeRowKey : rowKeySet) {
    cm.setRowKey(facesTreeRowKey);
    JUCtrlHierNodeBinding rowData =
    (JUCtrlHierNodeBinding)cm.getRowData();
    Row row = rowData.getRow();
    //cast to the right row class
    EmpEmpVoRow empRow = (EmpEmpVoRow) row;
    // now you cann access the child row iterator
    RowSetIterator it = empRow.getDepVO();
    //now you cna iterate over the child rows
    System.out.println("\n" +
    row.getAttribute(0) + " :: " + row.getAttribute(1) +
    " :: " + row.getAttribute(2));
    
    System.out.println("Displaying Child Records");
    //use hte child rows here
    
    }
    
    }
    

    Don't know if the code compiles out of the box (do this on the train :-)

    Timo

  • Insert records from one table to another table

    Hello

    I want to insert all records in table 1 which are not in table 2 in table2

    o/p
    Insert into table2
    Select * from table1
    where a.id! = b.id;

    Please let me know is there any way I can complete reviews
    insert
      into table2
      select  *
        from  table1
        where id not in (
                         select  id
                           from  table2
                        );
    

    SY.

  • Insert multiple records in a query from a loop

    Hello

    Im am seriously struggling with something here...


    PROBLEM:
    I want to insert multiple records of checkbox in my db...
    A simple insert statement inserts the 1 record...

    How can I insert all records?

    For example: 10 family names must be inserted at the same time...

    Check my code...


    PLEEEASE, im really craving for help!

    Thank you. Worked perfectly!

  • delete all records at once UCM

    Hi all

    Let me know how to clean my content server (to delete all records from content server).
    Is there a room any or a way to delete all the records at the same time?

    Kind regards
    Vijay

    A simple way is to use Archiver (Administration > Admin Applets > archive)
    Create a new archive (Edit > Add)
    Export (Actions > export)
    Check the delete the revisions after archive successful.

    This gives you a conveniently saved content with no content and all content server.

    Note that this will only remove the content and rating will give you a blank content server Vanilla so things like custom meta data fields, model components security all will remain.

    Tim

  • Retriving all records in table

    Hello

    To retrieve all records from the table, procedure below has been used, but the performance gets only a single record in the output.

    Procedure (proc_env) has been wrapped into the package (packg)

    This package gets the call from the java environment to extract all records in the table.

    Procedure wrapped in packaging
    --------------------------------------------------

    PROCEDURE proc_test (cursor1 OUT TestCursor)
    IS
    BEGIN
    OPEN FOR Cursor1
    SELECT col1,
    col2,
    COL3
    Table_name FROM
    END;


    procedure called for execution
    -----------------------------------------
    DECLARE
    v_col1 table.col_name%TYPE;
    v_col2 table.col_name%TYPE;
    v_col3 table.col_name%TYPE;
    v_cur packg. TestCursor;
    BEGIN
    packg.proc_test (v_cur);
    EXTRACT the v_cur IN v_col1, v_col2, v_col3;
    DBMS_OUTPUT. ENABLE;
    Dbms_output.put_line (v_col1 |) ',' || v_col2 | «, » || v_col3);
    END;
    /


    How to retrieve all the records in the table?


    What is missing in the code?


    Regarding
    SET SERVEROUTPUT ON
    DECLARE
        v_col1 table.col_name%TYPE;
        v_col2 table.col_name%TYPE;
        v_col3 table.col_name%TYPE;
        v_cur packg.TestCursor;
    BEGIN
        DBMS_OUTPUT.ENABLE;
        packg.proc_test(v_cur);
        LOOP
          FETCH v_cur INTO v_col1,v_col2,v_col3;
          EXIT WHEN v_cur%NOTFOUND;
          DBMS_OUTPUT.put_line(v_col1||','||v_col2||','||v_col3);
        END LOOP;
        CLOSE v_cur;
    END;
    /
    

    SY.

  • Help inserting a record

    I have an access database and need to insert a record from a formmy query does not work, can help?
    Here's my query;

    < are method = Post Action = doform.cfm >
    < table border = 0 cellspacing = 5 >
    < b >
    < td valign = "top" > < span class = "t15" > question: </span > < table >
    < td > < textarea name = passes "After" = "60" rows = "5" > < / textarea > < table >
    < /tr >
    < /table >
    < / make >
    < CFQUERY "InsertRecord' DATASOURCE = NAME ="AdminServerIssues">
    Insert in question (Office)
    Values ('#form.) Issue #')
    < / CFQUERY >

    tracjerian,

    1. Add a button "Send" to the form
    2. If you use a form of auto-commit (IE code is a page named "doform.cfm"), the FORM. Variable issue exist only after the form is submitted. Use IsDefined() to detect if the form field exists and if this is the case, run the insert query.

  • ODI 12 c: IKM for differential insert and update with a sequence in the target table

    Hello

    I have a map where I fill in a column of my target table using a database sequence. Now my mapping is supposed to load the target gradually table. So I need a revenge for update and incremental insert. Now with this differential IKM it compares all the columns to match all colmuns line to understand, it should be an insert or update. Now, the following code shows that when the ROW_WID is loaded with a sequence of database.

    If NOT EXISTS

    (select 1 from W_LOV_D T

    where T.ROW_WID = S.ROW_WID

    and ((T.CREATED_BY = S.CREATED_BY) or (T.CREATED_BY IS NULL and S.CREATED_BY IS NULL)) and

    ....

    ....

    < the rest of the comparison of columns >

    )

    So when running ODI returns following error

    Caused by: java.sql.SQLSyntaxErrorException: ORA-00904: "S". "" ROW_WID ": invalid identifier

    Please suggest if there is no other IKM I should use or if there is another way around it without changing the code IKM...

    Hi Marc,

    Thanks for your reply.

    I had solved it. The incremental update process inserts all rows from the source table to I$ table that exists in the target table. It does so by the where sql such as mentioned in my questions as

    WHERE THERE is NOT ( . COLUMNS = . COLUMNS)

    Now in the incremental update IKM Oracle to retrieve all the columns it uses the substitution with parameter as TABLE TARGET. Due to this column sequence will in the comparison and the request fails. When I used the IKM SQL incremental update it used INTEGRATION TABLE as parameter table to pick up the columns, as I'd mentioned in the target sequence is run, so it does not get the sequence column.

    Simple answer: to solve this, use incremental update of the SQL IKM.

    Thank you

    SM

  • Use with need to collect in bulk to insert records from multiple tables

    Hello

    I plsql record type with several tables with multiple columns. so when I used bulk collect with education for ALL. I want to insert records in multiple tables.

    Please give me suggestions.

    ForAll is designed to be used with a single DML statement, which may include dynamic SQL statements. However, I do not know what advantage this will give you your list iteration save several times, one for each table - especially since there is an air show with SQL dynamic.

    Example 1 (dynamic SQL):

    begin

      ...

      forall i in vRecList.First..vRecList.Last
        execute immediate '
        begin
          insert into Table1 (Col1, Col2, Col3) values (:1, :2, :3);
          insert into Table2 (Col1, Col2, Col3) values (:1, :2, :3);
        end;' using vRecList(i).Col1, vRecList(i).Col2, vRecList(i).Col3;
    end;

    Another approach that I should work (but not tested) is using to insert all the Scriptures and based record inserts, but you need to try on your version of Oracle forall has changed between the versions.  In this case vRecList must be compatible with the Table % ROWTYPE and Table2% ROWTYPE type.


    Example 2 (insert all):

    begin

      ...

      forall i in vRecList.First..vRecList.Last

        insert all

          into Table1 values vRecList(i)
          into Table2 values vRecList(i)
        select 1 from dual;

    end;

  • Apple Watch: can I receive all messages from whatsapp on my Apple Watch, but not the Group whatsapp messages, don't know why... Help, please. Besides, my watch is custom in Spanish, but only answer messages Whatsapp understands English... someone kn

    I can receive all messages from whatsapp on my Apple Watch, but not the Group whatsapp messages, don't know why... Help, please.

    Besides, my watch is custom in Spanish, but only answer messages Whatsapp understands English... anyone know why? Thanks to you all!

    Hello

    To change the language for a response on your watch: Press answer > firmly press the screen > press on choose language > select Spanish.

  • Use Insert all but want only to insert records for non-null values

    Hi, New here and could use some help with my sql statement.  I have a portfolio with denormalized data table that has been inserted via .csv file.  It is a contract with a base, options and extensions.  I need to create a contract record, then a separate record in the table for each base/option/extension contract Details.  I use INSERT ALL so I maintain the CONTRACT_ID for the secondary table.  My problem is that my statement puts a line in the table of details for the null records, that I don't want.  (i.e. 123 contract has a Base, Option 1, Option 2 and Option 3, but I'm getting a line for these lines with dates more null for Option 4, Ext 1, Ext 2, Ext 3 and Ext 4).  I want to insert only when the % CTRT_STRT_DT is NOT NULL.  It will be different for each contract.  Where should I put the IS NOT NULL statement?  Here is my complete insert statement:

    -Contract data

    INSERT ALL

    IN LRTC)

    CTRT_ID,

    PRGRM_OFC_TYP_CD,

    CTRT_NME,

    CREN_DT)

    VALUES)

    CTRT_ID_SEQ. NEXTVAL,

    PRGRM_OFC_TYP_CD,

    SPLS_SRVS_DESC,

    SYSDATE)

    -Contract detail for another period of performance data

    IN CTRT_DTLS)

    CTRT_ID,

    CTRT_STAT_CD,

    CTRT_PER_NME,

    CTRT_STRT_DT,

    CTRT_END_DT,

    CTRT_CURR_AMT,

    CTRT_NO,

    CTRT_VNDR_NME,

    CREN_DT)

    VALUES)

    CTRT_ID_SEQ. NEXTVAL,

    1,

    "Other."

    OTHER_CTRT_STRT_DT,

    OTHER_CTRT_END_DT,

    OTHER_CTRT_CURR_AMT,

    CTRT_NO,

    CTRTR_NME,

    SYSDATE)

    -Contract detail data for the reference period of performance

    IN CTRT_DTLS)

    CTRT_ID,

    CTRT_STAT_CD,

    CTRT_PER_NME,

    CTRT_STRT_DT,

    CTRT_END_DT,

    CTRT_CURR_AMT,

    CTRT_NO,

    CTRT_VNDR_NME,

    CREN_DT)

    VALUES)

    CTRT_ID_SEQ. NEXTVAL,

    1,

    'Base ',.

    BASE_CTRT_STRT_DT,

    BASE_CTRT_END_DT,

    BASE_CTRT_CURR_AMT,

    CTRT_NO,

    CTRTR_NME,

    SYSDATE)

    -Data contract detail for Option 1 execution time-out

    IN CTRT_DTLS)

    CTRT_ID,

    CTRT_STAT_CD,

    CTRT_PER_NME,

    CTRT_STRT_DT,

    CTRT_END_DT,

    CTRT_CURR_AMT,

    CTRT_NO,

    CTRT_VNDR_NME,

    CREN_DT)

    VALUES)

    CTRT_ID_SEQ. NEXTVAL,

    1,

    "Option 1",

    OPT1_CTRT_STRT_DT,

    OPT1_CTRT_END_DT,

    OPT1_CTRT_CURR_AMT,

    CTRT_NO,

    CTRTR_NME,

    SYSDATE)

    -Data contract detail for Option 2 execution time-out

    IN CTRT_DTLS)

    CTRT_ID,

    CTRT_STAT_CD,

    CTRT_PER_NME,

    CTRT_STRT_DT,

    CTRT_END_DT,

    CTRT_CURR_AMT,

    CTRT_NO,

    CTRT_VNDR_NME,

    CREN_DT)

    VALUES)

    CTRT_ID_SEQ. NEXTVAL,

    1,

    'Option 2',

    OPT2_CTRT_STRT_DT,

    OPT2_CTRT_END_DT,

    OPT2_CTRT_CURR_AMT,

    CTRT_NO,

    CTRTR_NME,

    SYSDATE)

    -Data contract detail for Option 3 lead time

    IN CTRT_DTLS)

    CTRT_ID,

    CTRT_STAT_CD,

    CTRT_PER_NME,

    CTRT_STRT_DT,

    CTRT_END_DT,

    CTRT_CURR_AMT,

    CTRT_NO,

    CTRT_VNDR_NME,

    CREN_DT)

    VALUES)

    CTRT_ID_SEQ. NEXTVAL,

    1,

    'Option 3',

    OPT3_CTRT_STRT_DT,

    OPT3_CTRT_END_DT,

    OPT3_CTRT_CURR_AMT,

    CTRT_NO,

    CTRTR_NME,

    SYSDATE)

    -Data contract detail for Option 4 execution time-out

    IN CTRT_DTLS)

    CTRT_ID,

    CTRT_STAT_CD,

    CTRT_PER_NME,

    CTRT_STRT_DT,

    CTRT_END_DT,

    CTRT_CURR_AMT,

    CTRT_NO,

    CTRT_VNDR_NME,

    CREN_DT)

    VALUES)

    CTRT_ID_SEQ. NEXTVAL,

    1,

    'Option 4',

    OPT4_CTRT_STRT_DT,

    OPT4_CTRT_END_DT,

    OPT4_CTRT_CURR_AMT,

    CTRT_NO,

    CTRTR_NME,

    SYSDATE)

    -Data contract detail for Extension 1 execution time-out

    IN CTRT_DTLS)

    CTRT_ID,

    CTRT_STAT_CD,

    CTRT_PER_NME,

    CTRT_STRT_DT,

    CTRT_END_DT,

    CTRT_CURR_AMT,

    CTRT_NO,

    CTRT_VNDR_NME,

    CREN_DT)

    VALUES)

    CTRT_ID_SEQ. NEXTVAL,

    1,

    'Extension 1',

    EXT1_CTRT_STRT_DT,

    EXT1_CTRT_END_DT,

    EXT1_CTRT_CURR_AMT,

    CTRT_NO,

    CTRTR_NME,

    SYSDATE)

    -Data contract detail for Extension 2 execution time-out

    IN CTRT_DTLS)

    CTRT_ID,

    CTRT_STAT_CD,

    CTRT_PER_NME,

    CTRT_STRT_DT,

    CTRT_END_DT,

    CTRT_CURR_AMT,

    CTRT_NO,

    CTRT_VNDR_NME,

    CREN_DT)

    VALUES)

    CTRT_ID_SEQ. NEXTVAL,

    1,

    '2 Extension',

    EXT2_CTRT_STRT_DT,

    EXT2_CTRT_END_DT,

    EXT2_CTRT_CURR_AMT,

    CTRT_NO,

    CTRTR_NME,

    SYSDATE)

    -Data contract detail for Extension 3 lead time

    IN CTRT_DTLS)

    CTRT_ID,

    CTRT_STAT_CD,

    CTRT_PER_NME,

    CTRT_STRT_DT,

    CTRT_END_DT,

    CTRT_CURR_AMT,

    CTRT_NO,

    CTRT_VNDR_NME,

    CREN_DT)

    VALUES)

    CTRT_ID_SEQ. NEXTVAL,

    1,

    '3 Extension',

    EXT3_CTRT_STRT_DT,

    EXT3_CTRT_END_DT,

    EXT3_CTRT_CURR_AMT,

    CTRT_NO,

    CTRTR_NME,

    SYSDATE)

    -Data contract detail for Extension 4 execution time-out

    IN CTRT_DTLS)

    CTRT_ID,

    CTRT_STAT_CD,

    CTRT_PER_NME,

    CTRT_STRT_DT,

    CTRT_END_DT,

    CTRT_CURR_AMT,

    CTRT_NO,

    CTRT_VNDR_NME,

    CREN_DT)

    VALUES)

    CTRT_ID_SEQ. NEXTVAL,

    1,

    '4 Extension',

    EXT4_CTRT_STRT_DT,

    EXT4_CTRT_END_DT,

    EXT4_CTRT_CURR_AMT,

    CTRT_NO,

    CTRTR_NME,

    SYSDATE)

    SELECT

    PRGRM_OFC_TYP_CD,

    SPLS_SRVS_DESC,

    CTRT_NO,

    CTRTR_NME,

    To_date(PER_OF_PFRM_OTHER_ST_DT,'MM/DD/YYYY') as OTHER_CTRT_STRT_DT,

    To_date(PER_OF_PFRM_OTHER_END_DT,'MM/DD/YYYY') as OTHER_CTRT_END_DT,

    CUR_VAL_BY_POP_OTHER_AMT as OTHER_CTRT_CURR_AMT,

    To_date(PER_OF_PFRM_BASE_ST_DT,'MM/DD/YYYY') as BASE_CTRT_STRT_DT,

    To_date(PER_OF_PFRM_BASE_END_DT,'MM/DD/YYYY') as BASE_CTRT_END_DT,

    CUR_VAL_BY_POP_BASE_AMT as BASE_CTRT_CURR_AMT,

    To_date(PER_OF_PFRM_OPT1_ST_DT,'MM/DD/YYYY') as OPT1_CTRT_STRT_DT,

    To_date(PER_OF_PFRM_OPT1_END_DT,'MM/DD/YYYY') as OPT1_CTRT_END_DT,

    CUR_VAL_BY_POP_OPT1_AMT as OPT1_CTRT_CURR_AMT,

    To_date(PER_OF_PFRM_OPT2_ST_DT,'MM/DD/YYYY') as OPT2_CTRT_STRT_DT,

    To_date(PER_OF_PFRM_OPT2_END_DT,'MM/DD/YYYY') as OPT2_CTRT_END_DT,

    CUR_VAL_BY_POP_OPT2_AMT as OPT2_CTRT_CURR_AMT,

    To_date(PER_OF_PFRM_OPT3_ST_DT,'MM/DD/YYYY') as OPT3_CTRT_STRT_DT,

    To_date(PER_OF_PFRM_OPT3_END_DT,'MM/DD/YYYY') as OPT3_CTRT_END_DT,

    CUR_VAL_BY_POP_OPT3_AMT as OPT3_CTRT_CURR_AMT,

    To_date(PER_OF_PFRM_OPT4_ST_DT,'MM/DD/YYYY') as OPT4_CTRT_STRT_DT,

    To_date(PER_OF_PFRM_OPT4_END_DT,'MM/DD/YYYY') as OPT4_CTRT_END_DT,

    CUR_VAL_BY_POP_OPT4_AMT as OPT4_CTRT_CURR_AMT,

    To_date(PER_OF_PFRM_EXT1_ST_DT,'MM/DD/YYYY') as EXT1_CTRT_STRT_DT,

    To_date(PER_OF_PFRM_EXT1_END_DT,'MM/DD/YYYY') as EXT1_CTRT_END_DT,

    CUR_VAL_BY_POP_EXT1_AMT as EXT1_CTRT_CURR_AMT,

    To_date(PER_OF_PFRM_EXT2_ST_DT,'MM/DD/YYYY') as EXT2_CTRT_STRT_DT,

    To_date(PER_OF_PFRM_EXT2_END_DT,'MM/DD/YYYY') as EXT2_CTRT_END_DT,

    CUR_VAL_POP_EXT2_AMT as EXT2_CTRT_CURR_AMT,

    To_date(PER_OF_PFRM_EXT3_ST_DT,'MM/DD/YYYY') as EXT3_CTRT_STRT_DT,

    To_date(PER_OF_PFRM_EXT3_END_DT,'MM/DD/YYYY') as EXT3_CTRT_END_DT,

    CUR_VAL_BY_POP_EXT3_AMT as EXT3_CTRT_CURR_AMT,

    To_date(PER_OF_PFRM_EXT4_ST_DT,'MM/DD/YYYY') as EXT4_CTRT_STRT_DT,

    To_date(PER_OF_PFRM_EXT4_END_DT,'MM/DD/YYYY') as EXT4_CTRT_END_DT,

    CUR_VAL_BY_POP_EXT4_AMT as EXT4_CTRT_CURR_AMT

    OF CTRT_HLDG A, PRGRM_OFC_TYP_LKUP B

    WHERE UPPER (A.OFC_NME) = UPPER (B.PRGRM_OFC_TYP_NME);

    Thanks for any help.

    Chris

    You're close.  Basically, you add one when befire each Inserts lines.  Something like:

    INSERT ALL

    When the ctrt_id is not null then

    IN LRTC (PRGRM_OFC_TYP_CD, CTRT_NME, CTRT_ID, CREN_DT)

    VALUES (CTRT_ID_SEQ. NEXTVAL, PRGRM_OFC_TYP_CD,

    SPLS_SRVS_DESC, SYSDATE)

    -Contract detail for another period of performance data

    When the OTHER_CTRT_STRT_DT is not null then

    IN (CTRT_ID, CTRT_STAT_CD, CTRT_PER_NME, CTRT_DTLS

    CTRT_STRT_DT, CTRT_END_DT, CTRT_CURR_AMT,

    CTRT_NO, CTRT_VNDR_NME, CREN_DT)

    VALUES (CTRT_ID_SEQ. NEXTVAL, 1, 'Other', OTHER_CTRT_STRT_DT,

    OTHER_CTRT_END_DT, OTHER_CTRT_CURR_AMT,

    CTRT_NO, CTRTR_NME, SYSDATE)

    -Contract detail data for the reference period of performance

    When the BASE_CTRT_STRT_DT is not null then

    IN (CTRT_ID, CTRT_STAT_CD, CTRT_PER_NME, CTRT_DTLS

    CTRT_STRT_DT, CTRT_END_DT, CTRT_CURR_AMT,

    CTRT_NO, CTRT_VNDR_NME, CREN_DT)

    VALUES (CTRT_ID_SEQ. NEXTVAL, 1, 'Base', BASE_CTRT_STRT_DT,

    BASE_CTRT_END_DT, BASE_CTRT_CURR_AMT, CTRT_NO,

    CTRTR_NME, SYSDATE)

    You may need to adjust my predicates, but it should give you the idea.

    John

  • Create a new record from an existing record

    Hello

    -----------------------------
    Scenario of
    -----------------------------
    Block H-> table header has an identifier of main text field called 'ID' (field ID is generated only after registration)
    D1 block multi retail-> table B
    Details of multi block D2-> table C and who is a child of the Table B.

    Table C is filled in the post - insertion of table B and reviews of D2 are read in a view / read only the form by clicking a block
    -----------------------------
    Requirement
    -----------------------------

    The user wants the ease of copying the entire feature. The requirement is to create a new record to be created with the original values of the existing record and the recording of a new value should be generated in the field ID.

    We have a copy button.

    We wonder what is the approach to be taken for this. A create_record and duplicate_record will work in the copy button

    Please suggest... pointers on what other things need to be supported, so that the final result a new record successfully. Would appreciate an approach of details here...

    Concerning
    SR

    Take a look at the DUPLICATE_RECORD() built into the forms help system. It will create a new record and copy all values from item in table of basis of registration that has focus and copy the values to the new record.

    Craig...

Maybe you are looking for

  • Memory graphic question Equium EA60-199

    Hey there, I just added a new 512 DDR SO-DIMM for my laptop, and I wanted to know if it was possible to increase the allocation of memory. I currently have an ATi Mobility Radeon with 64 MB, but I wanted to increase this to 128 or 256 MB. I read the

  • 4th gen Apple TV Wifi issues

    My 4th generation Apple TV has problems with wifi. Every day when the apple TV goes to sleep he loses the credentials of wifi OR it does not attach to my wifi network. I have to use the apple remote to tether to wifi. I tried Gz 2,4 and 5, and I see

  • HP 7520: help! Need to uppercase letters for the wireless password.

    Help, please! Try to completely install an all-in-one HP Photosmart 7520. Wireless installation wizard warns that passwords are case-sensitive, but I do not see a "shift" key or some other mechanism to type uppercase. All the tips to solve such as in

  • HP j3600 driver for windows 7

    is there a driver for hp officejet j3600 for windows 7? pls help... can not install my printer in windows 7

  • Scosche Bluefusion Interface module

    Please bear with me. I came to a 3 g iPhone and before that, I had WM 6.5 on an AT & T tilt, so I'm really new to Android. I am happy with my ATRIX. I have an iPhone/iPod connector that allows me to listen to music and change the track using radio co