Results 1 to 7 of 7
  1. #1
    Join Date
    Feb 2004
    Posts
    79

    Unanswered: Oracle error- during table creation

    I get following error:
    SQL> CREATE table myTable(
    2 ID VARCHAR2 (17) NOT NULL,
    3 DATESTAMP DATE DEFAULT sysdate NOT NULL,
    4 PAGES NUMBER(4) NOT NULL,
    5 TIME NUMBER (4) NOT NULL)
    6 PRIMARY KEY ( ID) ;
    PRIMARY KEY ( ID)
    *
    ERROR at line 6:
    ORA-00922: missing or invalid option

    Help appreciated. Thanks!

  2. #2
    Join Date
    Apr 2003
    Location
    Minneapolis, MN
    Posts
    273
    CREATE table myTable(
    2 ID VARCHAR2 (17) PRIMARY KEY,
    3 DATESTAMP DATE DEFAULT sysdate NOT NULL,
    4 PAGES NUMBER(4) NOT NULL,
    5 TIME NUMBER (4) NOT NULL);
    Bhavin

    MS Computer Science
    OCP DBA 9i/8i

  3. #3
    Join Date
    Feb 2004
    Posts
    79
    Thanks, it works

  4. #4
    Join Date
    Feb 2004
    Posts
    79
    Originally posted by sampav
    Thanks, it works
    I created an output spool file myspool.txt
    May I know where Oracle creates this file..
    Thanks!
    Samy

  5. #5
    Join Date
    Apr 2003
    Location
    Minneapolis, MN
    Posts
    273
    In your case, it will be on local Hard Disk.
    Bhavin

    MS Computer Science
    OCP DBA 9i/8i

  6. #6
    Join Date
    Feb 2004
    Location
    Eternity
    Posts
    31
    In windows the spool file will be created in the directory from where u ran the sqlplusw.exe.
    For Ex:If you have a shortcut for sqlplusw.exe on the desktop and u execute it then the spool file will be created on the desktop.
    If u want your own patch then specify the full patch of the file name like
    spool c:\temp\spool .By default Oracle will add the extension .LST but you can override it by adding your own extension

  7. #7
    Join Date
    Feb 2004
    Posts
    79
    I treid this
    SQL> spool c:\temp\spool\spool.txt
    SP2-0332: Cannot create spool file.
    Please let me know what I could be doing wrong
    Thnaks

Posting Permissions

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