Merge lines with a non-primary key of a row without losing data

Hello people,


Do you know how I can get all the entertainment on a single line ID? As you can see there is a line for each kind of pastime for each code.

ID---FNM--LNAME--HOBBY1---HOBBY2---HOBBY3---HOBBY4
100 jan - Jansen - race-
100 - Jan - Jansen dance-
100 jan - Jansen - works
101 Dan - Dansen - race-
101 Dan - Dansen - works
102 Jeff - Eulalie - race-
102 Jeff - Eulalie - pool -.

Result must be present;

ID---FNM---LNAME---HOBBY1---HOBBY2---HOBBY3---HOBBY4
100--Jan---Jansen---running---dancing---walking
101 Dan - Dansen - running - walking
102 Jeff - Eulalie - running - pool -.


Thank you!

Published by: 868316 on June 25, 2011 04:11

868316 wrote:
I forgot to mention that I had this table, for example hobby.

All the answers to your hobby of on-the-fly question use table (WITH clause). Just Remover it. For example, you have table hobby, right? Then adjust my solution:

select  id,
        fnm,
        lname,
        max(hobby1) hobby1,
        max(hobby2) hobby2,
        max(hobby3) hobby3,
        max(hobby4) hobby4
  from  hobby
  group by id,
           fnm,
           lname
  order by id,
           fnm,
           lname
/ 

SY.

Tags: Database

Similar Questions

  • How can I change the key of a lunch without losing the words in my karaoke VanBasco window when using cakewalk pro audio.

    Original title: Using cakewalk pro audio

    How can I change the key of a lunch without losing the words in my karaoke VanBasco window when using cakewalk pro audio. Can anyone help please

    Hello

    What operating system is installed on the computer?

    Contact Cakewalk for assistance:

    Here is the link: http://forum.cakewalk.com/default.aspx

  • Is there a way to get a list of tables with multi-column primary keys?

    I have a model over 1000 tables, each containing primary and some keys with unique indexes.  I need a list of multi-column primary keys and a list of the unique indexes that are not the primary key.  Is there a way this information easily?

    I have a generator that creates the merge instructions and I needed a way to retrieve the PK, if any, UK and otherwise the first Unique Index.  This comes from a cursor, so there are some variables for the schema and the name of the table and a constant for pk 'P' and 'U '.

    -- Primary/Unique Key
    SELECT   *
    FROM     dba_cons_columns concol, dba_constraints con
    WHERE    concol.owner = UPPER ( pv_schema )
    AND      concol.table_name = UPPER ( pv_table_name )
    AND      ( con.constraint_type = const.v_constraint_primary
    OR        ( con.constraint_type = const.v_constraint_unique
    AND        NOT EXISTS
                 (SELECT NULL
                  FROM   dba_constraints conx
                  WHERE  conx.constraint_type = const.v_constraint_primary
                  AND    conx.owner = con.owner
                  AND    conx.table_name = con.table_name
                  AND    conx.constraint_name = con.constraint_name) ) )
    AND      concol.owner = con.owner
    AND      concol.table_name = con.table_name
    AND      concol.constraint_name = con.constraint_name;
    
    -- Unique Index
    SELECT *
    FROM   dba_ind_columns indcol,
           (SELECT   indcol.table_owner,
                     indcol.table_name,
                     indcol.index_owner,
                     MIN ( indcol.index_name ) min_index_name
            FROM     dba_ind_columns indcol, dba_indexes ind
            WHERE    ind.index_type = 'NORMAL'
            AND      ind.uniqueness = 'UNIQUE'
            AND      indcol.table_owner = UPPER ( pv_schema )
            AND      indcol.table_name = UPPER ( pv_table_name )
            AND      indcol.table_owner = ind.table_owner
            AND      indcol.table_name = ind.table_name
            AND      indcol.index_owner = ind.owner
            AND      indcol.index_owner = indcol.table_owner
            AND      indcol.index_name = ind.index_name
            GROUP BY indcol.table_owner,
                     indcol.table_name,
                     indcol.index_owner) ind
    WHERE  indcol.table_owner = ind.table_owner
    AND    indcol.table_name = ind.table_name
    AND    indcol.index_owner = ind.index_owner
    AND    indcol.index_name = ind.min_index_name;
    
  • A foreign key can reference a unique non-primary key?

    Hello everyone, I have 2 tables: [books] with the fields (id, title, author, isbn) and another table called [issue Book] with the fields (id, borrower_id, borrow_date, book_isbn)...
    Now the field (book_isbn) in the [book number] table of authorities (isbn) in the table [books], which is a single field, but not a primary key.

    My questions:

    1 - is this OK for a foreign key referencing a unique key but no primary in another table?

    2 is it normal that the foreign key field to have another name as the field it references in another table?

    Your help is appreciated indeed...

    Yes CF can refer to Unique key, but you must specify the Unique key column when the creation of FK

    and YES FK may have a different name, but for your convenience, we use the same column name

    Here is an example

    create table mymaster
    (val_id number unique);
    
    create table mydetail
    (det_id number,
     val_id_fk number references mymaster(val_id));
    

    Please mark correct / useful if it is

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

  • request for deletion with a composite primary key

    I have the following problem, which seems very simple, but I'm a bit at a loss :)

    I have a table T1 with composite primary key F1 and F2.

    There is a second table I want to use to delete records of T1 T2. It contains als F1 and F2.

    I want to do something like this
    delete from T1
    where T1.F1, T1.F2 in (select T2.F1, T2.F2 from T2);
    Of course, this does not work.

    There are solutions, but I find them unsatisfactory:
    -A loop of PL/SQL and passes the key one
    -Concatenate F1 and F2: where T1. F1 | T1. F2 to (select T2. F1 | W2M T2 F2); - but it's very ugly.

    Surely it must be possible in a simple SQL statement...

    Thank you!

    Rob
    delete from T1
    where (F1,F2) in (select T2.F1, T2.F2 from T2);
    

    Max
    [My Italian blog Oracle | http://oracleitalia.wordpress.com/2010/01/17/supporto-di-xml-schema-in-oracle-xmldb/]

  • Tabular with sno as primary key

    Hello
    I have a tabular form on an emp_tab of the table that is composed of these sno, empid, ename column and the primary key is sno. I have a trigger on the table:
    ------------------------------------------------------------------------------------->
    CREATE OR REPLACE the TRIGGER 'trg_emp_tab '.
    Before Insert on 'emp_tab '.
    for each line
    Start
    If: NEW. "' SNO ' is null then
    Select 'emp_tab_seq'.nextval in: NEW. "' Sno ' from dual;
    end if;
    end;
    /
    ALTER TRIGGER 'trg_emp_tab' ENABLE
    /
    ---------------------------------------------------------------------------------------->
    When I am trying adding new line by adding the values of empid and ename, I get the following error:

    Internal error in the routine mru: ORA-20001: error in MRU: line = 1, ORA-04098: trigger ' APPS. TRG_EMP_TAB' is invalid and has no revalidation, insertion in "APPS". "" EMP_TAB values ' ('SNO', "EMPID", "ENAME") (: b1,: b2,: b3)
    Error failed to process the update.
    Ok

    Thank you
    Manoi.

    Hello Eric,

    Your trigger seems incorrect. So there is no column Sno in EMP_TAB or there is no sequence called EMP_TAB_SEQ.
    (I would remove the "in the code of the trigger).

    Greetings,
    Roel
    http://roelhartman.blogspot.com/
    You can reward this replica by scoring as is + useful + or + good + ;-)

  • Return the first line with a non-null value in a column

    Hey there, gurus. Can someone give me a hand with this?

    I have a table with six columns: Class_ID, Course_ID, start_date, Last_Name, First_Name, company. When our students take a class and will fill in an evaluation form, they fill in the Class_ID Last_Name First_Name, and Company. The Course_ID and Start_Date are filled automatically based on the Class_ID.

    I am trying to generate a report that contains Class_ID, Course_ID and Start_Date, PLUS the value of the first not null in the column of company for a combination given to the three first columns. Here is my SQL that does not quite do the trick:

    Select distinct c.class_id, c.course_id, c.start_date, p.company
    class c, person p, student s
    where substr (c.course_id, 1, 3) = "OBI".
    and c.start_date > = SYSDATE-30
    and c.class_id = s.class_id
    and s.pid = p.pid
    order start_date, company, class_id, course_id

    At present, if in a given class, a student entered "CCCC" under the name of the company and another entry "Collin Co Comm Coll" and another between "Collin College", I would get three rows of this class when you use the SQL above. I want just one line. I don't really like which company names gets selected - one of them will be great for our needs. I just need to see a line for each class_id and single value that some students entered the area of the company. And I guess I have to say that if no student fills in the name of the company I need to see the value null, because I need to see the line no matter what.

    Looks like some sort of funky outer join or a coalesce, but it is beyond my ability to understand.

    Now I get this:
    During class 1234 SQL271 Date 22/07/2013 company XYZ Inc.
    Made up of class 1234 SQL271 Date 22/07/2013 company XYZ
    1234 SQL271 Date 22/07/2013 company XYZ, class

    What I want:
    Class 1234 SQL271 22/07/2013 Date course XYZ Inc. or one of the other 2

    Thanks in advance!
    select c.class_id, c.course_id, c.start_date, max(p.company) company
    from class c, person p, student s
    where substr(c.course_id,1,3) = 'OBI'
    and c.start_date >= SYSDATE-30
    and c.class_id = s.class_id
    and s.pid = p.pid
    group by c.class_id, c.course_id, c.start_date
    order by class_id, start_date, course_id
    

    Or if you want to list all businesses, you can use LISTAGG if you're on the latest version of ORACLE

  • Update line programmatically with Composite primary keys

    Hi all

    I use JDeveloper 11.1.2.4.0,I want to update the program with two primary keys PK1_ID and PK2_ID line

    When I have a primary key I can do it by:

    /////////////////////////////////////////////////////

    Key = new key (new Object() {empid});

    Employees1ViewImpl vo = (Employees1ViewImpl) this.getEmployees1View1 ();

    Locate the line using key reference in the View object.

    Line k = vo.getRow (key);

    using this method, we can set the new FirstName

    k.setAttribute ("FirstName", "Vero");

    this.getDBTransaction () .commit ();

    ///////////////////////////////

    Is it possible to use the same code with more of primary key?




    Kind regards

    The key class contains an array of attributes that identify the line you're looking for. In your case, the key has two attributes

    Key = new key (new Object() {pkId1, pkId2});

    the rest of the method works as what.

    Timo

  • Returns the primary key of the new line (generated by the trigger) to an insert procedure

    Hello
    I have a table with a primary key (number), which increases with the trigger
    I use a procedure to insert data into this table
    How can I find the primary key of the row inserted to this procedure?

    When you make use of the insert:

    INSERT .... RETURNING key_column INTO variable;
    

    (where key_column is your key on the table column and variable is a variable to store the value of the same data type)

    to get the value in a variable.

  • Local primary key on reference partitioned Table

    Oracle running on Red Hat Linux Rel6 11.2.0.3.

    I'm on a closed network, so the following must be typed manually.

    I have a table of documents which is essentially the following:

    (entire annual <-primary key)

    whole Source_ID,

    load_dt date,

    date of doc_dt,

    doc_info clob,

    ...)

    which is partitioned on column source_id.

    I created a partitioned table of reference as follows:

    create table doc_entities_prt)

    whole doc_entity_id

    all annual,

    whole entity_id,

    forced doc_ent_fk (annual) references to documents (annual)

    tablespace...

    allow the movement of the line

    benchmark score (doc_ent_fk);

    The annual column in the child table is not unique.  The doc_entity_id column is unique.  I want to set the primary key on doc_entities_prt as a local index on the doc_entity_id column.  I was not able to find the proper syntax to get there, and now I'm wondering if this is even possible? Any ideas appreciated.

    Oops, I missed part that you want to base the PK of this index. No, it is not possible and has nothing to do with the partitoning reference. A unique index can be partitioned only if it includes a partitioning column. You can create a non-unique without partitioning column partitioned index, but then you can't create PK supported by such an index for the same reason - oracle would not be able to verify uniquenes based on this index partition and controls of the cross-partition are not supported:

    SQL > create table documents)
    2 whole annual,
    3 whole source_id,
    load_dt date 4.
    date of doc_dt 5.
    6 doc_info clob
    7                        )
    8 partition by range (source_id)
    9      (
    10 partition p1 values less than (10),
    11 partition p2 values less than (100)
    12)
    13.

    Table created.

    SQL > create index unique documents_pk
    2 on documents (annual)
    (3) local
    partition 4 p1,
    5 partition p2
    6         )
    7.
    on documents (annual)
    *
    ERROR on line 2:
    ORA-14039: partitioning columns must be a subset of the columns of a unique key
    index

    SQL > create index documents_pk
    2 on documents (annual)
    (3) local
    partition 4 p1,
    5 partition p2
    6         )
    7.

    The index is created.

    SQL > alter table documents
    2 Add the constraint documents_pk
    3 key (annual) elementary school
    4 using index documents_pk
    5.
    change the documents table
    *
    ERROR on line 1:
    ORA-14196: specified Index cannot be used to apply the constraint.

    SQL >

    SY.

  • Change of primary key on the Table clears the other columns

    Preliminary info/Installation
    JDeveloper 11 g 11.1.1.6.0
    We have a table (object view or entity) that has 8 columns. The primary key is composed of 4 1 columns.
    The table is displayed in a page fragment.
    2 of the 4 non-primary key columns are LOV.
    All the 8 columns are needed.
    The table is editable including 2 of primary key columns.

    Question
    Assume that the table displays the 3 lines. If we change a rank 1 non-primary key column and a primary key in row 2 column, everything works well when we are committed to the database
    If, however, we first change a primary key column, then a primary key on a different line column, then the column/row primary key that changed us first, gets annihilated and the other columns LOV on this same line. The 2 columns that are not LOV keep data as it should. We then get a validation error because the required data are not present. All this happens before we try all commit to the database. If debug us and look the iterator, it has the old data in this document, before and after any performance on the binding.
    If we look at and update the data via the App Module, everything works well. We have tried to update the view, etc. through valueChangeListener also with no luck.

    If you change the primary key value, it should not be the primary key.

    This is true in the design of database relational regardless of how access you the data. In addition, EO don't like if you change the primary key value.

    Have you considered adding a surrogate key (use a sequence) and make your PK course a unique key?

    John

  • validate the primary key

    If the user enters two combination should trigger the error

    For example I testcode table with the primary key is combination of code1, code2, if use enter the same value for both two code I have to raise error am in jdeveloper 11.1.1.7.0

    see this

    Zeeshan Baig blog: define the constraints of unique keys for Non-primary key attributes ADF-British Colombia

    http://www.gabrielsideras.com/2010/09/28/ADF-unique-key-validation/

    http://www.databaseskill.com/1654786/

  • Update a primary key of type char data

    Hello
    Not a guy to oracle technology. but am forced to work on a query that is a basic requirement.

    I have a table that has a composite primary key values (6 columns).
    Of these, I've updated 1 specific column, which is a char data type.

    I tested after writing my logic as a query, threw it [the Unique constraint violated schema.tablename];

    So I gave it a query simple base to test it yet, still get the same error.

    Query such as:

    Update table_name set Column1 = "100000" where column2 = 'BOMBAY '; (Column1 is the primary key of type char)

    Even if it did not work.
    Now a doubt arises, a column is a primary key of type Char can be modified? or is it not possible at all to do?

    Note: I made sure only am not updated with a duplicate value;


    Thank you.

    Published by: 966353 on October 18, 2012 12:01

    While you never need to update a primary key (regardless of the type of data), it is possible to do. If you get an error ORA-00001 indicating that a unique constraint has been violated and the unique constraint that is violated is associated with the primary key of the table (I'm guessing that this is the case according to your description of the error), implying strongly that the update would result in duplicate rows. Your UPDATE statement updates more than 1 row? If so, how do you determine when the update is complete there will be no duplicate lines?

    Justin

  • Primary key cause problem in the meantime Partition Exchange

    DB: 11.2.0.2
    OPERATING SYSTEM: AIX 6.1

    I get the problem when exchanging data with range partitioned table. I have a partitioned table of interval and a regular intermediate table with data to be uploaded.
    Here are the steps that I did.
    SQL> CREATE TABLE DEMO_INTERVAL_DATA_LOAD (
                    ROLL_NUM        NUMBER(10),
                    CLASS_ID        NUMBER(2),
                    ADMISSION_DATE  DATE,
                    TOTAL_FEE       NUMBER(4),
                    COURSE_ID       NUMBER(4))
                    PARTITION BY RANGE (ADMISSION_DATE)
                    INTERVAL (NUMTOYMINTERVAL(3,'MONTH'))
                    ( PARTITION QUAT_1_2012 VALUES LESS THAN (TO_DATE('01-APR-2012','DD-MON-YYYY')),
                     PARTITION QUAT_2_2012 VALUES LESS THAN (TO_DATE('01-JUL-2012','DD-MON-YYYY')),
                     PARTITION QUAT_3_2012 VALUES LESS THAN (TO_DATE('01-OCT-2012','DD-MON-YYYY')),
                     PARTITION QUAT_4_2012 VALUES LESS THAN (TO_DATE('01-JAN-2013','DD-MON-YYYY')));
    
    Table created.
    
    SQL> ALTER TABLE DEMO_INTERVAL_DATA_LOAD ADD CONSTRAINT IDX_DEMO_ROLL PRIMARY KEY (ROLL_NUM);
    
    Table altered.
    
    SQL> SELECT TABLE_OWNER,
               TABLE_NAME,
               COMPOSITE,
               PARTITION_NAME,
           PARTITION_POSITION,
              TABLESPACE_NAME,
           LAST_ANALYZED
    FROM DBA_TAB_PARTITIONS
        WHERE TABLE_OWNER='SCOTT'
       AND TABLE_NAME='DEMO_INTERVAL_DATA_LOAD'
       ORDER BY PARTITION_POSITION;
    
    TABLE_OWNER                    TABLE_NAME                     COM PARTITION_NAME                 PARTITION_POSITION TABLESPACE_NAME                LAST_ANAL
    ------------------------------ ------------------------------ --- ------------------------------ ------------------ ------------------------------ ---------
    SCOTT                          DEMO_INTERVAL_DATA_LOAD        NO  QUAT_1_2012                                     1 USERS
    SCOTT                          DEMO_INTERVAL_DATA_LOAD        NO  QUAT_2_2012                                     2 USERS
    SCOTT                          DEMO_INTERVAL_DATA_LOAD        NO  QUAT_3_2012                                     3 USERS
    SCOTT                          DEMO_INTERVAL_DATA_LOAD        NO  QUAT_4_2012                                     4 USERS
    
    SQL> INSERT INTO DEMO_INTERVAL_DATA_LOAD VALUES (10,1,'12-MAR-2012',1000,90);
    
    1 row created.
    
    SQL> INSERT INTO DEMO_INTERVAL_DATA_LOAD VALUES (11,5,'01-JUN-2012',5000,80);
    
    1 row created.
    
    SQL> INSERT INTO DEMO_INTERVAL_DATA_LOAD VALUES (12,9,'12-SEP-2012',4000,20);
    
    1 row created.
    
    SQL> INSERT INTO DEMO_INTERVAL_DATA_LOAD VALUES (13,7,'29-DEC-2012',7000,10);
    
    1 row created.
    
    SQL> INSERT INTO DEMO_INTERVAL_DATA_LOAD VALUES (14,8,'21-JAN-2013',2000,50); ---- This row will create a new interval partition in table.
    
    1 row created.
    
    SQL> commit;
    
    SQL> SELECT TABLE_OWNER,
            TABLE_NAME,
            COMPOSITE,
            PARTITION_NAME,
            PARTITION_POSITION,
            TABLESPACE_NAME,
            LAST_ANALYZED
      FROM DBA_TAB_PARTITIONS
         WHERE TABLE_OWNER='SCOTT'
       AND TABLE_NAME='DEMO_INTERVAL_DATA_LOAD'
       ORDER BY PARTITION_POSITION;
    
    TABLE_OWNER                    TABLE_NAME                     COM PARTITION_NAME                 PARTITION_POSITION TABLESPACE_NAME                LAST_ANAL
    ------------------------------ ------------------------------ --- ------------------------------ ------------------ ------------------------------ ---------
    SCOTT                          DEMO_INTERVAL_DATA_LOAD        NO  QUAT_1_2012                                     1 USERS
    SCOTT                          DEMO_INTERVAL_DATA_LOAD        NO  QUAT_2_2012                                     2 USERS
    SCOTT                          DEMO_INTERVAL_DATA_LOAD        NO  QUAT_3_2012                                     3 USERS
    SCOTT                          DEMO_INTERVAL_DATA_LOAD        NO  QUAT_4_2012                                     4 USERS
    SCOTT                          DEMO_INTERVAL_DATA_LOAD        NO  SYS_P98                                         5 USERS   
    
    SYS_P98 partition is added to table automatically.
    
    SQL> CREATE TABLE DEMO_INTERVAL_DATA_LOAD_Y (
                    ROLL_NUM        NUMBER(10),
                    CLASS_ID        NUMBER(2),
                    ADMISSION_DATE  DATE,
                    TOTAL_FEE       NUMBER(4),
                    COURSE_ID       NUMBER(4)); 
    
    Table created.
    
    SQL> INSERT INTO DEMO_INTERVAL_DATA_LOAD_Y VALUES (30,3,'21-MAY-2013',2000,12);
    
    1 row created.
    
    SQL> commit;
    
    Commit complete.
    
    
    Since, i need a partition in DEMO_INTERVAL_DATA_LOAD table, which can be used in partition exchange, so i create a new partition as below:
    
    
    SQL> LOCK TABLE DEMO_INTERVAL_DATA_LOAD PARTITION FOR (TO_DATE('01-APR-2013','DD-MON-YYYY')) IN SHARE MODE;
    
    Table(s) Locked.
    
    SQL> SELECT TABLE_OWNER,
               TABLE_NAME,
               COMPOSITE,
               PARTITION_NAME,
               PARTITION_POSITION,
               TABLESPACE_NAME,
               LAST_ANALYZED
    FROM DBA_TAB_PARTITIONS
        WHERE TABLE_OWNER='SCOTT'
       AND TABLE_NAME='DEMO_INTERVAL_DATA_LOAD'
       ORDER BY PARTITION_POSITION;
    
    TABLE_OWNER                    TABLE_NAME                     COM PARTITION_NAME                 PARTITION_POSITION TABLESPACE_NAME                LAST_ANAL
    ------------------------------ ------------------------------ --- ------------------------------ ------------------ ------------------------------ ---------
    SCOTT                          DEMO_INTERVAL_DATA_LOAD        NO  QUAT_1_2012                                     1 USERS
    SCOTT                          DEMO_INTERVAL_DATA_LOAD        NO  QUAT_2_2012                                     2 USERS
    SCOTT                          DEMO_INTERVAL_DATA_LOAD        NO  QUAT_3_2012                                     3 USERS
    SCOTT                          DEMO_INTERVAL_DATA_LOAD        NO  QUAT_4_2012                                     4 USERS
    SCOTT                          DEMO_INTERVAL_DATA_LOAD        NO  SYS_P98                                         5 USERS
    SCOTT                          DEMO_INTERVAL_DATA_LOAD        NO  SYS_P102                                        6 USERS
    
    SQL> ALTER TABLE DEMO_INTERVAL_DATA_LOAD
    EXCHANGE PARTITION SYS_P102
    WITH TABLE DEMO_INTERVAL_DATA_LOAD_Y
    INCLUDING INDEXES
    WITH VALIDATION;
    ALTER TABLE DEMO_INTERVAL_DATA_LOAD
    *
    ERROR at line 1:
    ORA-14097: column type or size mismatch in ALTER TABLE EXCHANGE PARTITION
    Now, if I turn off and drop the primary key constraint, it works without any problem.
    SQL> alter table DEMO_INTERVAL_DATA_LOAD disable constraint IDX_DEMO_ROLL;
    
    Table altered.
    
    SQL> alter table DEMO_INTERVAL_DATA_LOAD drop constraint IDX_DEMO_ROLL;
    
    Table altered.
    
    SQL> ALTER TABLE DEMO_INTERVAL_DATA_LOAD
    EXCHANGE PARTITION SYS_P102
    WITH TABLE DEMO_INTERVAL_DATA_LOAD_Y
    INCLUDING INDEXES
    WITH VALIDATION; 
    
    Table altered.
    
    SQL> select * from DEMO_INTERVAL_DATA_LOAD partition (SYS_P102);
    
      ROLL_NUM   CLASS_ID ADMISSION  TOTAL_FEE  COURSE_ID
    ---------- ---------- --------- ---------- ----------
            30          3 21-MAY-13       2000         12
    
    SQL> select * from DEMO_INTERVAL_DATA_LOAD_Y;
    
    no rows selected
    Please suggest.

    First of all, thanks for posting the code that allows us to reproduce your test. It is essential for such problems.

    Because the primary key is global you will not be able to use

    INCLUDING INDEXES
    WITH VALIDATION;
    

    And you need to add the primary key to the temporary table

     ALTER TABLE DEMO_INTERVAL_DATA_LOAD_Y ADD CONSTRAINT IDX_DEMO_ROLL_Y PRIMARY KEY (ROLL_NUM);
    

    The Exchange will work. You must rebuild the primary key after the Exchange.

  • Primary key in 11g - known problem 6894412 problem

    Hello world:

    We are on JDeveloper 11.1.1.4 and JHeadstart 11.1.1.2.46. This thread was initially started on the JHeadstart forum and can be seen at: problem with 11 g LOV

    We are converting our application of 10g and 11g. We have an established Oracle database that does not pre-filled primary keys that are the sequence number. Our database has composite keys and the integrity of these composite keys are established by foreign key constraints to edit tables. This approach has worked very well for us for more than a decade, the logic of the database has been designed so that the database protects itself through the elimination of cascading deletes, as appropriate, and cascade deletes as the precepts of business logic. This will not change.

    In the tables of the database in which the application of 10g was posted in table format, after conversion to 11g, the pop - ups LOV don't work unless you have pressed the SAVE button (or refresh the browser). The first popup LOV will work, but as soon as you select a value in the it, pop ups LOV next will not run until the SAVE or REFRESH method is done. It is only in a tabular format. If the display format is form, our main work of LOV - keys very well. In 10g, this feature has worked as long as we use a button "Add a LINE" on a table format. The add a line button caused the primary key values be returned to the application, but may not display on the screen. A refresh would then show them.

    Since the original investigation in the JHeadstart forum, I realize that we are hitting 'Primary keys of the model' 6894412 problem listed in the Release Notes 11.1.1.4. We spent many, many hours creating a reusable .jar file of all of the features of this very large database such as suggested by JDeveloper best practices (http://download.oracle.com/docs/cd/B31017_01/web.1013/b25947/bcadvgen007.htm). This has worked very well for set us in 10g - details of the entity in a place, once, and then each application can reuse. Productivity at its best. Therefore, we cannot make false columns in our database in order to correct this "limitation" in 11 g. We have several complex tables of child-parent/child to put in our application that will not work unless our entities have correctly defined primary keys. I tried to implement workaround was found in the release notes, but were unable to make it work.

    I created a unit test with the HRSchema by adding a table to this pattern that I can provide the SQL commands, but I do not know in Oracle taking in charge of the to send to. Could someone provide me with information on who to contact please. I, I think, took all the measures contained in the release notes for this problem and have clearly documented the changes in the .jsff page, but the problem persists. Clearly, I do something wrong, or would like more information.

    Thanks in advance

    Mary
    U

    Hello

    There is no "" one person in support to send it directly to. Apply you for Services using http://metalink.oracle.com/ report the problem and download your test scenario. Support then concludes the expert to analyze

    Frank

Maybe you are looking for