Problem CREATE TABLE with PRIMARY KEY Still in Trouble ! Please Help!

Hi there !
I use the orcle 8i, and i don't know why i can't create table with any primary key EXample:
SQL> CREATE TABLE O_caisses
2 (No_caisse NUMBER(3) constraint caisses_pk PRIMARY KEY,
3 NB_BILLETS NUMBER(5)
4 )
5 /
CREATE TABLE O_caisses
ERROR at line 1:
ORA-18008: cannot find OUTLN schema
***********some Debuger show me this way: *********************
Well there r certain point u got to notice when creating a table with constraints.
1) U can create table with COLUMN level constraint.
2) U can create table with TABLE level constraint.
3) In COLUMN level constraint u can't give a constraint a name
but only mention the type of constraint.
4) In TABLE level constraint u can give a name to constraint.
Following are the examples of both
--COLUMN LEVEL
CREATE TABLE O_caisses
(No_caisse NUMBER(3) PRIMARY KEY,
NB_BILLETS NUMBER(5));
--TABLE LEVEL
CREATE TABLE O_caisses
(No_caisse NUMBER(3),
NB_BILLETS NUMBER(5),
constraint pk_caisse primary key (No_caisse));
********************And this is another one:*****************
SQL>grant create any outline to username;
BUT the problem is still present, i don't know what to do now !
Please could some body help me !
Thanks alot!
Luong.

The clue is in the error message: the OUTLN schema is missing.
This is something Oracle 8i introduced to help manage the CBO (or soemthing equally geeky and internal). For some reason your database no longer has this user. It ought to be created automatically during installation (or upgrade) but catproct may not have completed probably or some over zealous admin type has dropped it.
Solution is to re-install (or re-upgrade) as you cannot create this user on their own. Alas.
HTH, APC

Similar Messages

  • Problem on CREATING TABLES  with PRIMARY KEY

    Hi there !
    I use the orcle 8i, and i don't know why i can't create table with any primary key EXample:
    SQL> CREATE TABLE O_caisses
    2 (No_caisse NUMBER(3) constraint caisses_pk PRIMARY KEY,
    3 NB_BILLETS NUMBER(5)
    4 )
    5 /
    CREATE TABLE O_caisses
    ERROR at line 1:
    ORA-18008: cannot find OUTLN schema
    Please could some body help me !
    Thanks alot!
    Luong.

    Luong,
    Your syntax is fine. It looks like you don't have the correct database privileges to create the table. The error message you're getting suggests that you don't have CREATE ANY OUTLINE privileges. You should log in as a user than can grant these privileges and give yourself the correct privileges. I think the syntax is
    SQL>grant create any outline to username;
    Alison

  • Problem creating table with foreign key in SQL Workshop

    Application Express version 2.2.1.00.04
    Get error message "Number of referencing columns/data types must match referenced columns"
    Master table SLS_SUPPLIERS has primary key SLS_ID NUMBER(8,0) and when creating table SLS_PRODUCTS with FK SLS_SLP_ID NUMBER(8,0) using the create table wizard I get the above error.
    The name of the FK is SLP_SLS_FK, key column is SLP_SLS_ID, referenced table is SLS_SUPPLIERS and referenced column is SLS_ID.
    Any help is much appreciated.
    James Edey
    I should add that if I create the table without the foreign key constraint and then create the constraint separately in SQL Workshop then it creates OK. It only fails in the create table wizard dialog.
    Message was edited by:
    edeyje
    Obviously no-one interested in this - just thought it may be a bug in v2.2 that the development team would find useful.
    James
    Message was edited by:
    edeyje

    I replied to the other thread on this too -
    there is a bug on that page when you click Next. If you define more than one fk but then navigate using the links on the process chart on the left (Constraints, Confirm, etc), the page works fine. We do have a bug on this now and I just added the notes I will need to get this fixed in 3.1 (I have already assigned it to me - must have some rogue validation that fires on next).
    Sorry it took so long for this to get noticed - I am glad I checked the forum this morning -
    -- Sharon

  • Problems creating a partitioned primary key index.

    I am creating a partitioned table and I noticed that when I use the constraint option of the create table the primary key is not partitioned. I then tried using the using index clause and specifying the create index local and that is giving errors. Here is my current syntax that is causing the errors:
    create table redef_temp (
         USER_ID          VARCHAR2(32),
         GROUP_ID     VARCHAR2(32),
         JOIN_DATE     DATE DEFAULT SYSDATE NOT NULL,
         constraint primary key
         using index (create index pk_redef_temp
    on redef_temp (USER_ID, GROUP_ID)
    LOCAL STORE IN (IDX)))
    tablespace data
    partition by hash (user_id)
         (PARTITION ic_x_user_group_part_p1 tablespace DATA,
         PARTITION ic_x_user_group_part_p2 tablespace DATA,
         PARTITION ic_x_user_group_part_p3 tablespace DATA,
         PARTITION ic_x_user_group_part_p4 tablespace DATA)
    PARALLEL ENABLE ROW MOVEMENT;
    Thanks

    The following works on 9.2.0.8 and 10.2.0.3:
    create table redef_temp (
         USER_ID VARCHAR2(32),
         GROUP_ID VARCHAR2(32),
         JOIN_DATE DATE DEFAULT SYSDATE NOT NULL,
         constraint pk_redef_temp primary key (user_id, group_id)
         using index (
              create index pk_redef_temp
              on redef_temp (USER_ID, GROUP_ID)
              LOCAL tablespace test_8k
    tablespace test_8k
    partition by hash (user_id) (
         PARTITION ic_x_user_group_part_p1 tablespace test_8k,
         PARTITION ic_x_user_group_part_p2 tablespace test_8k,
         PARTITION ic_x_user_group_part_p3 tablespace test_8k,
         PARTITION ic_x_user_group_part_p4 tablespace test_8k
    PARALLEL ENABLE ROW MOVEMENT
    /Your syntax for the constraint definition was wrong, and your use of 'store in' for the index tablespace was wrong. I've had to change all tablespace names to 'test_8k'.
    Regards
    Jonathan Lewis
    http://jonathanlewis.wordpress.com
    http://www.jlcomp.demon.co.uk

  • Auto Populate Field in One Table with Primary Key from another table.

    Greetings all,
    I have created two tables. One for Root Cause which will be the based description information of an analysis. Each Root cause can have many corrective actions.
    My Table structure is as follows:
    RCCA TABLE:
    =====================================
    Column Name     Data Type     Nullable
    RCCAID     NUMBER     No
    DESCRIPTION     VARCHAR2(4000)     Yes
    SUMMARY     VARCHAR2(4000)     Yes
    OWNER     VARCHAR2(4000)     Yes
    DATEOFINCIDENT DATE     Yes
    STATUS     VARCHAR2(4000)     Yes
    CORRECTIVE ACTION TABLE
    =====================================
    Column Name     Data Type     Nullable
    CAID     NUMBER     No
    RCCAID     NUMBER     No
    CANUMBER      NUMBER     Yes
    CACTION     VARCHAR2(4000)      Yes
    DATEDUE     DATE     Yes
    COMMENTS     VARCHAR2(4000)      Yes
    So I have a form that creates the RCCA and then I have another form that I want to feed off of the first form. My thought was that when the RCCA was created, it would open a report of the RCCA and then in another region of the page I would add corrective action form. What I am looking to do is when I press the Create Corrective Action, it will automatically populate the RCCAID in the Corrective Action Table so that it is associated directly to the RCCA. I don't want to have to have someone know what the RCCAID is from teh RCA table because they are autogenerated.
    There may be a better way to do this and since I am new to APEX and to Oracle Databases, I am just going with what my logic tells me. Any assistance or thoughts would be appreciated.
    Assuming there would be some type of trigger?
    I will have to be able to view each RCCA and CA in a report that customers will see.
    Thanks in Advance
    Wally

    Hi Debasis,
    Have a look on this
    Quick note on IDENTITY column in SAP HANA
    Regards,
    Krishna Tangudu

  • I just purchase ipad2 and i tried to download some books but it kept giving me this error 1004. i tried to reset still the same problem. i reset my credit card still the same. please help

    i just purchase an ipad2 yesterday when i tried to download some apps it kept giving me this error1004 msg. i tried to reset everything still the same msg. I even reset my account credit card still the same. I already talk to ipad support she does have clue either.

    There's advice on the 1004 in the following document:
    iTunes: Specific update-and-restore error messages and advanced troubleshooting

  • Insert row with datapages/bc4j  problem with primary key

    Hi everybody,
    i tryed to insert a new row into a table with primary key (id) and therfore used a datapage, where there is a html-form and the data tag set attribute to get the data into the BC.
    I also want to use a sequence for the primary key and made a trigger to insert the key-value before insert. but in this case it doesnt work. I also tryed to get the sequence to the BC -Layer (so that i can set the PK in the View OBJ already) with a View Object but I dont know how.
    so what schould i do??
    thanxx
    Martin

    There's a know issue, when creating a record with blob, the blob content won't show until committing. The blob is added too late, which means you're in trouble with not-null fields...
    Sue, is this logged as a bug? And the dialog captions?
    K.

  • Help Needed..... Problems with Primary Key.

    Hello all.
    ive been trying to do this for a while but not luck, im after some advice on ive got a java program connected to mysql database and i want to create a copy of a table, then be able to delete records from the new table. it seems like you cannot update copied tables because it doesnt copy the primary keys because i get
    SQLException: Result Set not updatable (referenced table has no primary keys)
    is there a way around this?
    heres what i have:
    public void createTemporyTables(){
    try{
    Statement stmt5 = conn.createStatement();
    int rows1 = stmt5.executeUpdate("CREATE TABLE tempAnimals SELECT * FROM animals");
    Statement stmt6 = conn.createStatement();
    int rows2 = stmt6.executeUpdate("CREATE TABLE tempAnimalsQuestions SELECT * FROM animalsquestions");
    if (rows1 == 0){
    System.out.println("Don't add any row!");
    else{
    System.out.println(rows1 + " row(s)affected.");
    if (rows2 == 0){
    System.out.println("Don't add any row!");
    else{
    System.out.println(rows2 + " row(s)affected.");
    catch(Exception e)
    System.out.println("SQLException: " + e.getMessage());
    System.out.println("Method = createTemporyDatabase Error");
    public void remove(){
    try{
    Statement stmt13 = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);
    ResultSet yesItems = stmt13.executeQuery("SELECT * FROM tempanimals WHERE Q5 =\"y\"");
    Statement stmt14 = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);
    ResultSet yesQuestions = stmt14.executeQuery("SELECT * FROM tempanimalsquestions WHERE question = '5'");
    while(yesItems.next())
    yesItems.deleteRow();
    while(yesQuestions.next())
    yesQuestions.deleteRow();
    catch(Exception e)
    System.out.println("SQLException: " + e.getMessage());
    System.out.println("Method = removeYes Error");
    any help will be much appreciated..
    Ben

    Hi,
    Your temperary table has no primary key. Mention primary key field, when creating temperary table. See below statement change primary key field according to you.
    int rows1 = stmt5.executeUpdate("CREATE TABLE tempAnimals (primary key(animalid)) SELECT * FROM animals");
    int rows2 = stmt6.executeUpdate("CREATE TABLE tempAnimalsQuestions (primary key(questionid)) SELECT * FROM animalsquestions");Regards,
    Ram.

  • Another user has changed the row with primary key -Table changed externally

    Hello,
    I am facing the error: "Another user has changed the row with primary key oracle.jbo.Key[94 ]." during the delete operation.
    User case scenario:
    1. Added new row in the table.
    2. Once new row is added to the the table, another application will update few columns in the newly added row based on some logic.
    3. On the same session I am trying to delete the newly added row and getting above mentioned error.
    I have added a "Button" in the table to partialRefresh the table to check the new values of the changed columns.
    I have checked the forum and found many similar errors and tried the following but nothing helped.
    1. By setting "Auto Refresh = True" for the view object.
    Issue faced-> It worked fine but after few add and remove my db is getting to inconsistent state after which, I am not able to do any add/delete from my page.
    Error: "Too many objects match the primary key oracle.jbo.Key". I have checked this and I am not getting this error when "Auto Refresh = False" even after multiple add and remove actions.
    2. By Setting "Auto Refresh" the iterator associated with the page.
    Issue -> Did not work at all.
    Looking forward inputs from gurus.
    Thanks
    Abhijeet

    Finally I found one solution to this problem at: [ http://www.avromroyfaderman.com/2008/05/bring-back-the-hobgoblin-dealing-with-rowinconsistentexception/|http://www.avromroyfaderman.com/2008/05/bring-back-the-hobgoblin-dealing-with-rowinconsistentexception/]
    Simply overriding the lock() method in the entity object resolved issue. Kudos to the author.
    Code:
    public void lock() {
    try {
    super.lock();
    } catch (RowInconsistentException e) {
    refresh(REFRESH_WITH_DB_ONLY_IF_UNCHANGED | REFRESH_CONTAINEES);
    super.lock();
    But, Now my refresh button is not working as depend on the "Auto Refresh = True" to update the table.
    Can anyone tell me how can I refresh the VO of my table from the button.
    Thanks
    Abhijeet.
    P.S: I have already added the partial trigger but it is work not working as the data is cached in the VO. Removing the Cached property for the VO is creating other problems.

  • Help with primary key problem

    Oracle 9.2.0 on Red Hat Linux advanced server 2.1
    (There are a number of large tables that this applies to)
    I have a partitioned table where during the creation of the table a Primary key was declared and was placed 'using index tablespace primary_key'. So the table is created, and the primary key is set to use the 'primary_key' tablespace.
    Since our loads are quite large, we disable constraints during the load process, then enable them after the load has completed. Here's the problem, when the constraints are enabled, the tablespace for constraints change to the default tablespace of the schema owner.
    We have a specific tablespace created to hold the primary keys of the various tables, called 'primary_key'. The schema owner has his own default tablespace called 'POWER1'. When the schema owner runs the enable script to enable the primary keys, they all start being placed in 'POWER1' which is not nearly as large as 'primary_key' and as a result the first couple primary keys are created in 'POWER1' and then 'unable to extend segment in tablespace POWER1' pops up and the rest of the primary keys fail to enable.
    The workaround for this is to set the default tablespace for the schema owner to to be 'primary_key' but that is not what we really want.
    any feedback on this is appreciated, thanks

    In the old days, when we disabled a primary constraint, Oracle dropped the index. When we re-enabled the constraint the index was built again. But, if we didn't specify the index tablspace when we re-enabled the constraint the index was built in the default tablespace. Which is what is happening to you now.
    In 9i Oracle added the KEEP INDEX clause, which allowed us to retain the index even though the primary key was no longer enforced. However, as your aim is to increase the speed of data take on, you in fact want the index dropped. So, what you need to do is:
    ALTER TABLE whatever DISABLE PRIMARY KEY
    DROP INDEX;
    ALTER TABLE whatever ENABLE PRIMARY KEY
    USING INDEX TABLESPACE indx;Cheers, APC

  • OID users ( EUS) problem with grant create table with admin

    Hi,
    We activated enterprise users in the OID.
    There is a role APP_ADMIN that has the following grants:
    create user
    drop user
    create table with admin option
    this is for an application that creates BI schemas, so it needs to be able to create other users.
    I have granted these to a local role, and the user has access to the local role, thanks to the OID setup.
    The create and drop user work.
    however, the grant create table to another user does not work.
    Is there an issue with 'with admin option' grants in Enterprise user security?
    Regards,
    Peter

    If I grant
    grant create table to test_role with admin option;
    it does not work
    if I grant
    GRANT GRANT ANY PRIVILEGE to test_role WITH ADMIN OPTION;
    it does work.
    The test command as user with test_role is:
    grant create table to test_usr;
    very strange!
    If the user is a standard user and I create role test_role
    and grant create table to test_role with admin option it works.
    but if I convert the user to an EUS user and the same privilege is given to the role ( role is granted to a global role to an enterprise role)
    it doesnt work
    Edited by: Peter on Dec 7, 2012 2:36 PM

  • Doubt with PRIMARY KEY in sql!

    Dear friends,
    Can you please explain me this scenario's problems
    create table a ( eno number);
    alter table a add( eno1 number primary key);
    alter table a drop primary key;when i describe the table still the column eno1 is showing as NOT NULL. and i cannot modify it as NULL also by sayin
    alter table a modify ( eno1 null);is it s a problem with oracle itself or have i understood the concepts wrong.
    Regards,
    Manoj

    bluefrog --
    Did you repeat the OP's test case exactly? Here is both yours and the OP's on an 11.2.0.2 system and they behave differently.
    SQL> create table a(eno number primary key);
    Table created.
    SQL> desc a;
    Name                                                                                      Null?    Type
    ENO                                                                                       NOT NULL NUMBER
    SQL> alter table a drop primary key;
    Table altered.
    SQL> desc a;
    Name                                                                                      Null?    Type
    ENO                                                                                                NUMBER
    SQL> select * from v$version;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
    PL/SQL Release 11.2.0.2.0 - Production
    CORE    11.2.0.2.0      Production
    TNS for Solaris: Version 11.2.0.2.0 - Production
    NLSRTL Version 11.2.0.2.0 - Production
    5 rows selected.
    SQL> drop table a purge;
    Table dropped.
    SQL> create table a(eno number);
    Table created.
    SQL> alter table a add( eno1 number primary key);
    Table altered.
    SQL> desc a;
    Name                                                                                      Null?    Type
    ENO                                                                                                NUMBER
    ENO1                                                                                      NOT NULL NUMBER
    SQL> alter table a drop primary key;
    Table altered.
    SQL> desc a;
    Name                                                                                      Null?    Type
    ENO                                                                                                NUMBER
    ENO1                                                                                      NOT NULL NUMBER
    SQL>

  • Problem in generating the Primary Key

    Hi All ,
    I am trying to persist an object and also generating the primary key using a default sequence . But the problem is that the Primary key is getting incremented by 2 instead of 1 . My code looks like this :
    import java.util.HashMap;
    import javax.persistence.EntityManager;
    import javax.persistence.EntityManagerFactory;
    import javax.persistence.EntityTransaction;
    import javax.persistence.Persistence;
    import javax.persistence.PersistenceContext;
    import javax.persistence.PersistenceContextType;
    import javax.persistence.PersistenceUnit;
    public class entityCaller {
    //     @PersistenceContext(unitName="testApp" ,type=PersistenceContextType.EXTENDED)
         EntityManager em;
    //     @PersistenceUnit(unitName="testApp")
         EntityManagerFactory emf ;
         public void persistEntity( String Name , int Age ) {
              EntityManagerFactory emf =
              Persistence.createEntityManagerFactory("testApp", new HashMap());
              em = emf.createEntityManager();
              EntityTransaction entityTransaction = em.getTransaction();
         Tab1 oBJTab1 = new Tab1();
    //      oBJTab1.setId(Age);
         oBJTab1.setVal(Name);
              try{
                   System.out.println("Making object");
                   em.persist(oBJTab1);
                   System.out.println("Done");
                   System.out.println("Making object2");
                   System.out.println("Entered the Values");
              }catch (Exception e) {
                   e.printStackTrace();
              }finally{
              em.close();
         public static void main(String[] args) {
              entityCaller caller = new entityCaller();
              caller.persistEntity("DoAgain7",2);
    My persistence.xml looks like this :
    <?xml version="1.0" encoding="UTF-8"?>
    <persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
    <persistence-unit name="testApp">
    <provider>oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider</provider>
    <class>Tab1</class>
    <!-- <jta-data-source>java:/XAOracleDS</jta-data-source>     -->
    <properties>
    <!-- Provider-specific connection properties -->
    <property name="toplink.jdbc.driver" value="oracle.jdbc.driver.OracleDriver"/>
    <property name="toplink.jdbc.url" value="jdbc:oracle:thin:@127.0.0.1:1521:XE"/>
    <property name="toplink.jdbc.user" value="system"/>
    <property name="toplink.jdbc.password" value="jlkklkj"/>
    <!-- Provider-specific settings -->
    <!-- other values are: drop-and-create-tables|none -->
    </properties>
    </persistence-unit>
    </persistence>
    Please provide me with some pointer as to know where the things are going wrong.

    If you generated your original schema using toplink.ddl-generation, then later dropped it and created it then you should keep in mind the sequence table does not get dropped. This can lead to an initially 'empty' database with a PK sequence starting at '2' if you have one persistence unit and one entity. Can you steadily duplicate this or did you just notice that your persist started with an key of '2'? Just a thought.

  • Updateable columns with primary key

    Hi,
    I use HTML DB 2.0 and 10g R1.
    With HTML DB i would like create an application with 2 pages.
    The first page is an report from a table with 2 columns, the first column is datatype number(10) with primary key and the second column is varchar2(255).
    The report should looks like with an edit-icon for all rows and both columns with header.
    My problem is, the report has only 2 columns, not 3 columns and the edit-icon is together with the first table column, the header name is Edit.
    What can I do ?
    The second page should be a form linked from the first page for update, insert and delete rows. It's not possible to use a sequence on column with pk for new inserts.
    I don't know, which sample application has the same content or what I have to do.
    Who can help me ?

    Simply create an application "Report and Form" based on your table and modify it as follows:
    - On the report page, modify the query to include the PK column a second time (using an alias)... if this was based on the EMP table with EMPNO being the PK, the query then looks like this (modification bold):
    select
    "EMPNO",
    "EMPNO" as "EMPPLOYEE NUMBER",
    "ENAME",
    "JOB",
    "MGR",
    "HIREDATE",
    "SAL",
    "COMM",
    "DEPTNO"
    from "EMP"
    where
    instr(upper("ENAME"),upper(nvl(:P1_REPORT_SEARCH,"ENAME"))) > 0 or
    instr(upper("JOB"),upper(nvl(:P1_REPORT_SEARCH,"JOB"))) > 0
    - In the report attributes, move the added column to the desired position (I moved it directly next to the edit link).
    - On the Form page, just change the item holding your PK column from "hidden" to "Text field".
    You may take a look at http://htmldb.oracle.com/pls/otn/f?p=PK_VISIBLE:1 to verify this is what you're looking for.
    Edit: Oops - I just recognized I cannot update the EMPNO on page 2 since the automated row processing depends on an unchanged PK. However - normally it isn't a good idea to update a PK anyway (since it might be used as FK in some other table(s)).
    It is possible to create new records with manually adding the new PK, so if this is really all you need, then I would suggest you modify your edit page displaying the PK column read-only when editing an existing row and updatable when adding a new record (using 2 items with conditional display, based on the PK being NULL or NOT NULL).
    Holger
    Message was edited by:
    schweich

  • Null value in detail table's primary key

    I use Business Components Data Form to define a master-detail java panel.
    I don't display the primary key column in the detail grid control.
    Then I click on "+" to add a row, enter a value (the 2nd part of the detail table's primary key) and click commit.
    I get an error saying that the primary key column that's not displayed is null and the row cann't be committed.
    How do I fix this error?

    My fields are varchar2's.
    -- simplified to protect the guilty:
    -- (made up from memory, so sql keywords may --be misspelled, but you get the idea)
    create table proj (
    proj varchar2(10) not null,
    constraint proj_pk
    primary key(proj)
    insert into proj values ('abc');
    commit;
    -- this table has legal values for -- the master.legal field.
    -- in master, legal was changed to a -- ComboBoxControl control from -- TextFieldControl that the wizard -- generated.
    create table legal_values (
    proj varchar2(10) not null,
    legal varchar2(10) not null,
    display_order integer not null,
    constraint legal_values_pk
    primary key (proj, legal)
    insert into legal_values
    values ('abc', 'one', 1);
    insert into legal_values
    values ('abc', 'two', 2);
    insert into legal_values
    values ('abc', 'three', 3);
    commit;
    create table master (
    proj varchar2(10) not null,
    masterKey varchar2(15) not null,
    legal varchar2(10) not null,
    constraint master_pk
    primary key (proj, masterKey)
    create table detail (
    proj varchar(10) not null,
    masterKey varchar(15) not null,
    detailkey varchar(10) not null,
    display_order integer not null,
    status varchar2(12) not null, -- user can only update this field
    constraint detail_pk
    primary key(proj, masterkey, detailkey)
    -- legal rows for detail table
    create table detail_values (
    proj varchar2(10) not null,
    detailkey varchar2(10) not null,
    display_order integer not null,
    constraint detail_values_pk
    primary key(proj, detailkey)
    insert into detail_values values
    ('abc', 'status a', 1);
    insert into detail_values values
    ('abc', 'status b', 2);
    commit;
    -- if their is a foriegn key on details back
    -- to master, then you get the
    -- "mutating table" error when trigger
    -- occurs.
    create or replace trigger master_tr
    after insert on master
    for each row
    begin
    insert into detail
    (masterKey, detailKey, status, display_order, status)
    select :new.masterkey, detail_key, display_order, ' '
    from detail_values;
    end;
    -- detail.status is a comboboxControl getting --its values of of another db table too.
    -- there's also "after update" triggers on master and detail tables that copy the record to master_history and "detail_history" tables if the corresponding table is modified. Thus we have a history of the changes made to the records. The 2 history tables have 2 additional fields than their parents, "modified_date date default sysdate not null" and "modified_by varchar2(30) default user not null" that record when and who made the change. There's also a change type field that records where the change is an insert, delete or update (there 3 triggers per table , so we can correctly record change type as being insert, delete or update into the change_type field).
    If you want to make it more real to life, the status value is initially blank, then can be changed to a legal status value (complete or not complete), but can not be changed back to blank.
    ***P.S. I have to have this ready for production by monday.****
    P.P.S After you reply and change to ComboBoxControls in 2 places, try changing the table names and/or the column names (say to follow the DBA's naming convention) or add another field to the composite primary key (and unstated foriegn key) (using drop table/create table). Now try getting the existing code to run. No writing down the old/new table (or column) name pair names. Just run the code and try to fix the code based on the error messages. Are the error messages giving you adequate information to find the problem?

Maybe you are looking for

  • Can address book give a count of number in a group?

    I've found I can select all in the name column of a group, copy, and paste into Nisus Writer to print, or have Nisus give me a count of the # of paragraphs & therefore the number of entries. But I wondered if Address Book can simply tell me the numbe

  • Any Predefined Function in Oracle as 'ListAgg'

    Hi All, if we give input as '1,2,3,4,5' to get output as, 1 2 3 4 5 but there is a function for vice versa, listagg, just as like that I want to find out, if it is there any?Thanks,

  • How to start my webpage after the intro

    Hello. I'm novel at Flash, just started a few days ago, so I guess my question is basic . I've cheked it in forums but I could not find an answer. 1. What I've got: I'm making my personal webpage in Flash. I've created the INTRO, it's just a bunch of

  • Copying existing logical database

    HI , I have copied one logical database CRMLDB_SERVICE_MON and it has lot of selection entries which doesnt comes under my requirement . My req is to just to have three selection parameters . selection parameters are under some standard include . whi

  • Select into a variable

    Hi, I am trying to write a script that will find out the min(snap_id) and max(snap_id) from STATS$SNAPSHOT. THis script will pass these two variables when sppurge.sql is run, so it will input the lowsnap and hisnap and delete the old snapshots. So he