Table creation giving errors
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: Table creation giving errors

  1. #1
    Join Date
    May 2001
    Location
    London
    Posts
    149
    Hello,

    We have Application Owner with the name TBASAPP with default tablespace
    TBS_DATA_SML AND Temporary Tablespace TEMP. We have 4 tablespaces
    TBS_DATA_SML,TBS_DATA_MED,TBS_INDX_SML AND TBS_INDX_MED.
    I have a script to create tables in the schema.But for some tables it is giving errors "ORA-00907: missing right parenthesis". All other tables get created.
    Below is the example for one table which is giving error.
    I came to conclusion that tables which are having REFERENCES clause are giving errors.

    SQL> CREATE TABLE "TB_COLOR_THEME"("THEME_CODE" NUMBER NOT NULL,
    2 "COMPONENT_CODE" NUMBER NOT NULL,
    3 "ACTIVE_FRONT" NUMBER NOT NULL,
    4 "ACTIVE_BACK" NUMBER NOT NULL,
    5 "DISABLED_FRONT" NUMBER NOT NULL,
    6 "DISABLED_BACK" NUMBER NOT NULL,
    7 "ERROR_FRONT" NUMBER NOT NULL,
    8 "ERROR_BACK" NUMBER NOT NULL,
    9 "NORMAL_FRONT" NUMBER NOT NULL,
    10 "NORMAL_BACK" NUMBER NOT NULL,
    11 CONSTRAINT "PK_TB_COL_THEME" PRIMARY KEY("THEME_CODE","COMPONENT_CODE"),
    12 CONSTRAINT "FK_THEME_COMP" FOREIGN KEY("COMPONENT_CODE")
    13 REFERENCES "TB_COMPONENT"("COMPONENT_CODE")
    14 USING INDEX TABLESPACE TBS1U_INDX_SML)
    15 TABLESPACE TBS1U_DATA_SML
    16 /
    USING INDEX TABLESPACE TBS1U_INDX_SML)
    *
    ERROR at line 14:
    ORA-00907: missing right parenthesis



    Pls tell me what I have to do solve this issue.


    Paresh.

  2. #2
    Join Date
    Jun 2001
    Location
    Helsinki. Finland
    Posts
    3,938
    Run this:

    CREATE TABLE "TB"("THEME_CODE" NUMBER NOT NULL,
    "COMPONENT_CODE" NUMBER NOT NULL,
    "ACTIVE_FRONT" NUMBER NOT NULL,
    "ACTIVE_BACK" NUMBER NOT NULL,
    "DISABLED_FRONT" NUMBER NOT NULL,
    "DISABLED_BACK" NUMBER NOT NULL,
    "ERROR_FRONT" NUMBER NOT NULL,
    "ERROR_BACK" NUMBER NOT NULL,
    "NORMAL_FRONT" NUMBER NOT NULL,
    "NORMAL_BACK" NUMBER NOT NULL,
    CONSTRAINT "PK_TB_COL_THEME" PRIMARY KEY("THEME_CODE","COMPONENT_CODE")
    USING INDEX TABLESPACE TBS1U_INDX_SML,
    CONSTRAINT "FK_THEME_COMP" FOREIGN KEY("COMPONENT_CODE")
    REFERENCES TB_COMPONENT(COMPONENT_CODE)
    )
    TABLESPACE TBS1U_DATA_SML
    /
    Oracle Certified Master
    Oracle Certified Professional 6i,8i,9i,10g,11g
    email: ocp_9i@yahoo.com

  3. #3
    Join Date
    May 2001
    Location
    London
    Posts
    149
    thanks Julian

    Paresh

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width