ORA-00922

I am trying to execute the following two statements and get the error Ora-00922 with missing or invalid option. I seem to not be able to understand why it does not work.
I'm under 10.2.0.1.0 Oracle
The star of the error is under the sysadm.

create or replace sysadm.systables in select * from sys.systables;
create or replace sysadm.syscolumns in select * from sys.syscolumns;

Published by: user11181268 on October 20, 2009 12:56

If these are the tables that you want to create, then

create table .... as select

If you then view (s)

create or replace view ... as select

Published by: dombrooks on October 20, 2009 21:59

Tags: Database

Similar Questions

  • ORA-00922: missing or not valid option?

    Can someone tell me what is the problem with this statement:
    SQL > CREATE TABLE CUSTOMER2
    2 2 (employe_id NUMBER (10),)
    3 3 FIRST NAME VARCHAR2 (40),
    4 4 LASTNAME VARCHAR2 (40),
    5 5 VARCHAR2 (40) OF COMPANYNAME,.
    6 6 PHONE VARCHAR2 (40),
    7 7 E-MAIL VARCHAR2 (40),
    8 8 CITY VARCHAR2 (40),
    9 9 VARCHAR2 (40) STATE.
    10 10 ZIP VARCHAR2 (40)
    11 (11);
    2 (employe_id NUMBER (10),)
    *
    ERROR on line 2:
    ORA-00922: missing or not valid option

    Instead of your code with below

    CREATE TABLE CUSTOMER2
     ( employee_id NUMBER(10),
      FIRSTNAME VARCHAR2(40),
     LASTNAME VARCHAR2(40),
     COMPANYNAME VARCHAR2(40),
     PHONE VARCHAR2(40),
      EMAIL VARCHAR2(40),
      CITY VARCHAR2(40),
      STATE VARCHAR2(40),
      ZIP VARCHAR2(40)
      );
    
  • Error: PL / SQL: ORA-00922: missing or invalid option

    I'm sorry, I'm new to Oracle and am in a crazy time. I'm having all kinds of problems with the conversion of SQL to Oracle... and get the PL/SQL: ORA-00922: missing or not valid error option with the following function. Any help appreciated.

    FUNCTION IEXGADQReceived)
    v_BDateTime IN DATE
    v_EDateTime IN DATE
    v_Queuename IN VARCHAR2
    v_Username IN VARCHAR2
    )
    RETURN int IS
    INT v_retval;
    BEGIN
    SET v_retval: = (select count (distinct iid)
    Of agentinteractionsview
    WHERE the ibegintime between v_BDateTime and v_EDateTime
    and fromqueue = v_Queuename
    and fromroutereasonid = 11
    and username = v_Username);

    RETURN v_retval;
    END IEXGADQReceived;

    No problem, we've all been there before: D)

    FUNCTION IEXGADQReceived (v_BDateTime IN DATE,v_EDateTime IN DATE,v_Queuename IN VARCHAR2,v_Username IN VARCHAR2)RETURN int ISv_retval INT;BEGINselect count(distinct iid) INTO v_retval FROM agentinteractionsviewWHERE ibegintime between v_BDateTime and v_EDateTimeand fromqueue = v_Queuenameand fromroutereasonid = 11and username = v_Username;
    
    RETURN v_retval;END IEXGADQReceived;
    
  • [10g XE] ORA-01652... Can I change the tablespace?

    My apologies if the questions to ask to seem silly... I'm not used to manage a database; I'm really only familiar with a database query, but I XE (10g) installed on my local machine as my test environment, and I came across a problem today that I have not been able to understand yet on my own like...

    There, I created a username for me to use, so I wasn't just connecting as sys all the time. (I hear this is a bad thing, but for a small test environment of XE, I don't know how important that is.) Earlier this morning, I tried to create a table such as selecting a remote (via a database link) when I got an ORA-01652 error. He said, 'impossible to extend segment by 1028 temp in the SYSTEM tablespace. I didn't know why he tried to use the SYSTEM tablespace, but I took a peek, and it turns out that all the tables I have create under my username gets stuck in the SYSTEM tablespace.

    I did some research and found:
    CREATE TABLESPACE mytbs1
    DATAFILE '/u01/oracle/data/mytbs01.dbf' SIZE 500M
    EXTENT MANAGEMENT LOCAL
    SEGMENT SPACE MANAGEMENT AUTO;
    to create a tablespace, so I did that, it's 1 GB, but then I couldn't figure out how to make my username use always this tablespace.

    Also, I saw that I have a file temp.dbf, which is only 20 MB, and I wanted to make sure that my user name that was used as its temp tablespace, so I found this piece of code:
    ALTER USER <user_account> SET TEMPORARY TABLESPACE <temp_tbsp>
    and tried to use it for my temp temp tablespace, but I got ORA-00922: missing or invalid option (with SET indicated that the problem).

    In addition, moreover, if I find that 20 MB is not big enough for my temp space, how to extend that?


    Thanks in advance!

    Hello

    user11033437 wrote:

    
    SYS@XE 09-23-2010 09:08:01> alter user myusername set temporary tablespace temp;
    alter user myusername set temporary tablespace temp
    *
    ERROR at line 1:
    ORA-00922: missing or invalid option
    

    Search for the correct syntax in the SQL reference manual. (Lose 'SET').

    Get used to using textbooks.
    You can memorize the syntax for the commands and features that you use every day, but there's always a lot of things you do only from time to time. (You'll probably be creating or editing users only from time to time.)

  • immediate execution

    Hello, I'm on 11.2.0.4, and I'm trying to write a procedure with parameter that runs immediately a DDL.

    How can I write this while I'm on the parameter which will always be 0?

    SYS@db1 AS SYSDBA > create or replace procedure set_rm_tws (o_status NUMBER)

    as

    Start

    o_status: = 0;

    run immediately ' alter system set resource_manager_plan = "DEFAULT_PLAN" scope = "both"' using o_status;

    end;

    /

    Created procedure.

    SYS@db1 AS SYSDBA > var o_status number

    SYS@db1 AS SYSDBA > exec set_rm_tws(:o_status);

    BEGIN set_rm_tws(:o_status); END;

    *

    ERROR on line 1:

    ORA-00922: missing or not valid option

    ORA-06512: at "SYS." SET_RM_TWS', line 5

    ORA-06512: at line 1

    Hello Vili Dialis

    You will get all the information of the execution. What you get is simple no and not an exception.

    create or replace procedure set_rm_tws (o_status NUMBER)

    as

    Start

    o_status: = 0;

    run immediately ' alter system set resource_manager_plan = "DEFAULT_PLAN" scope = "both"' using o_status;

    EXCEPTION, THEN THAN OTHERS

    THEN o_status: = 1;

    END;

    /

    If you have a problem with running so that you can get the 1 in the variable o_status.

    The help of the o_status should be deleted.

    I hope it helps.

    Best regards, David

  • Partitioning with multiple subpartions

    I have three columns that identify a line - id, code and region. I am trying to create a partition on ID and two subparts CODE and REGION.

    I don't know if it's the best way to do it, so I'm open to suggestions. I'm not really on the USERS tablespace, but I think that each column must have its own tablespace.

    That's what I have so far, but I get a syntax error:

    CREATE TABLE t
    (   id           number
      , code         number
      , region       number
      , dt_effective date
    )
    PARTITION BY RANGE (id)
           SUBPARTITION BY RANGE (code)
           SUBPARTITION TEMPLATE 
           (
              SUBPARTITION part_code1 VALUES LESS THAN (500000) COMPRESS TABLESPACE users
            , SUBPARTITION part_code2 VALUES LESS THAN (1000000) COMPRESS TABLESPACE users
            , SUBPARTITION part_code3 VALUES LESS THAN (1500000) COMPRESS TABLESPACE users
            , SUBPARTITION part_code4 VALUES LESS THAN (2000000) COMPRESS TABLESPACE users
            , SUBPARTITION part_code5 VALUES LESS THAN (2500000) COMPRESS TABLESPACE users
            , SUBPARTITION part_code6 VALUES LESS THAN (3000000) COMPRESS TABLESPACE users
            , SUBPARTITION part_code7 VALUES LESS THAN (MAXVALUE) COMPRESS TABLESPACE users
           )
           SUBPARTITION BY LIST (region)
           SUBPARTITION TEMPLATE 
           (
      SUBPARTITION part_region1 VALUES (1) COMPRESS TABLESPACE users
           , SUBPARTITION part_region2 VALUES (2) COMPRESS TABLESPACE users
           )
           (
              PARTITION part_id1 VALUES LESS THAN (10001) COMPRESS TABLESPACE users
            , PARTITION part_id2 VALUES LESS THAN (20001) COMPRESS TABLESPACE users
            , PARTITION part_id3 VALUES LESS THAN (30001) COMPRESS TABLESPACE users
            , PARTITION part_id4 VALUES LESS THAN (40001) COMPRESS TABLESPACE users
            , PARTITION part_id5 VALUES LESS THAN (50001) COMPRESS TABLESPACE users
            , PARTITION part_id6 VALUES LESS THAN (60001) COMPRESS TABLESPACE users
            , PARTITION part_id7 VALUES LESS THAN (MAXVALUE) COMPRESS TABLESPACE users
           )
    /
    
    
           SUBPARTITION BY LIST (region)
           *
    ERROR at line 19:
    ORA-00922: missing or invalid option
    
    --sample data
    insert into t
    values(1,1,1,sysdate-7)
    /
    insert into t
    values(11000,500050,1,sysdate-7)
    /
    insert into t
    values(20010,2000010,1,sysdate-7)
    /
    insert into t
    values(40003,2800000,2,sysdate-7)
    /
    insert into t
    values(65000,3500000,2,sysdate-7)
    /
    

    I have three columns that identify a line - id, code and region. I am trying to create a partition on ID and two subparts CODE and REGION.

    It is not possible. Oracle only supports a level of subpartitioning.

    You can partition by ID and then use several columns for the subpartition (CODE, REGION).

    See "Use Multicolumn key partitioning" in the doc VLDB and partitioning

    http://docs.Oracle.com/CD/B28359_01/server.111/b32024/part_admin.htm#i1008909

    For example, this works:

    CREATE TABLE t

    (identification number

    code number

    the region number

    date of dt_effective

    )

    PARTITION OF RANGE (id)

    SUBPARTITION BY RANGE (code, region)

    SUBPARTITION TEMPLATE

    (

    SUBPARTITION part_code1_reg1 VALUES LESS THAN (500000: 1) COMPRESSES

    SUBPARTITION part_code1_reg2 VALUES LESS THAN (500000, 2) COMPRESSES

    SUBPARTITION part_code2_reg1 VALUES LESS THAN (1000000: 1) COMPRESSES

    SUBPARTITION part_code2_reg2 VALUES LESS THAN (1000000, 2) COMPRESSES

    )

    (

    PARTITION part_id1 VALUES LESS THAN (10001) COMPRESS

    , PARTITION part_id2 VALUES LESS THAN (20001) COMPRESS

    , PARTITION part_id3 VALUES LESS THAN (30001) COMPRESS

    , PARTITION part_id4 VALUES LESS THAN (40001) COMPRESS

    , PARTITION part_id5 VALUES LESS THAN (50001) COMPRESS

    , PARTITION part_id6 VALUES LESS THAN (60001) COMPRESS

    PARTITION part_id7 VALUES LESS THAN (MAXVALUE) COMPRESSES

    )

    /

  • Weird messages English SQLPLUS and pt_br (do not use the accent)

    Hello. I came here:

    Win 7 ultimate 64-bit (English); CHCP 850; 32-bit Java 7 (English); Oracle 11g r201.

    My chcp is 850 by default but I put chcp 1252 on command prompt when I start sqlplus.

    Installed, using the account administrator unblocked on win 7, oracle 11 g.

    Set environment variables:

    NLS_LANG = PORTUGUESE_BRAZIL. WE8MSWIN1252

    Path = D:\app\Jamn\product\11.2.0\dbhome_1\bin; C:\Program Files (x 86) \NVIDIA corporation\PhysX\Common;%SystemRoot%\ system32;%SystemRoot%;%SystemRoot%\ System32\Wbem;%SystemRoot%\system32\WindowsPowerShell\v1.0\

    ORACLE_HOME = D:\app\Jamn\product\11.2.0\dbhome_1

    ORACLE_SID = ORCL

    In addition, I got this in regedit:

    NLS_LANG (ditto); ORACLE_HOME (ditto); ORACLE_SID (ditto); and ORACLE_BASE = d:\app\administrator and many others that come with the registry.

    My data is correct. If I Express - select * from tb_cidades - all data are Ok.

    If I SELECT * FROM NLS_DATABASE_PARAMETERS; I had

    VALUE OF THE PARAMETER

    ------------------------------ ----------------------------

    NLS_LANGUAGE AMERICAN

    NLS_TERRITORY AMERICA

    NLS_CURRENCY $

    NLS_ISO_CURRENCY AMERICA

    NLS_NUMERIC_CHARACTERS.,.

    WE8MSWIN1252 NLS_CHARACTERSET

    NLS_CALENDAR GREGORIAN

    NLS_DATE_FORMAT DD-MON-RR

    NLS_DATE_LANGUAGE AMERICAN

    NLS_SORT BINARY

    NLS_TIME_FORMAT HH.MI. SSXFF AM

    NLS_TIMESTAMP_FORMAT-DD-MON-RR HH.MI. SSXFF AM

    NLS_TIME_TZ_FORMAT HH.MI. SSXFF AM TZR

    NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH.MI. SSXFF AM TZR

    NLS_DUAL_CURRENCY $

    BINARY NLS_COMP

    NLS_LENGTH_SEMANTICS BYTES

    NLS_NCHAR_CONV_EXCP FAKE

    NLS_NCHAR_CHARACTERSET AL16UTF16

    NLS_RDBMS_VERSION 11.2.0.1.0

    but I replace with

    SELECT * FROM NLS_SESSION_PARAMETERS;

    VALUE OF THE PARAMETER

    ------------------------------ --------------------------

    NLS_LANGUAGE PORTUGUESE

    NLS_TERRITORY BRAZIL

    NLS_CURRENCY R$

    NLS_ISO_CURRENCY BRAZIL

    NLS_NUMERIC_CHARACTERS.

    NLS_CALENDAR GREGORIAN

    NLS_DATE_FORMAT JJ/MM/RR

    NLS_DATE_LANGUAGE PORTUGUESE

    NLS_SORT WEST_EUROPEAN

    NLS_TIME_FORMAT HH24:MI:SSXFF

    JJ/MM/RR HH24:MI:SSXFF NLS_TIMESTAMP_FORMAT

    NLS_TIME_TZ_FORMAT HH24:MI:SSXFF TZR

    NLS_TIMESTAMP_TZ_FORMAT JJ/MM/RR HH24:MI:SSXFF TZR

    NLS_DUAL_CURRENCY Cr$

    BINARY NLS_COMP

    NLS_LENGTH_SEMANTICS BYTES

    NLS_NCHAR_CONV_EXCP FAKE

    the problem is when I start an order and received the as syntax error

    ALTER SYSTEM SET;

    change the system

    *

    ERROR on line 1:

    ORA-00922: Opþoo invsslida OU (b)

    SQL >

    Notice: first line in English, but after in Portuguese and not correct, without accentuation.

    I ve tried to set oracle_sid. ORACLE_HOME, approx. variable path (next to registry variables and approx.) by the program on the prompt sqlplus b4, but no joy.

    can some1 pls, pls help?

    Advance TY

    You seem to have WE8CP850.

    It's WE8PC850, WEPC (codepage) 850.

    To see what is available for you

    Select * from v$ nls_valid_values where parameter = "NLS_CHARACTERSET.

    (from memory)

    Don't change anything in the registry. The command window does not support the characters in Windows.

    ------------

    Sybrand Bakker

    Senior Oracle DBA

  • SUBPARTITION

    When I run the table creation script, I get an error "ORA-00922: missing or invalid option. When I remove "INTERVAL (NUMTOYMINTERVAL (1, 'MONTH') 'it works fine.). I can't have a SUBPARTITION interval? I'm on Oracle 11.2

    create table A_TEST (
    DT    DATE NOT NULL,
    COL1_LIST varchar2(10))    
    PARTITION BY LIST (COL1_LIST)
    SUBPARTITION BY RANGE (DT) INTERVAL(NUMTOYMINTERVAL(1, 'MONTH')
    (PARTITION P1 VALUES ('A')
      (subpartition SP1 VALUES LESS THAN (TO_DATE('01-10-2013', 'DD-MM-YYYY'))),
    PARTITION P2 VALUES ('B')
      (subpartition SP2 VALUES LESS THAN (TO_DATE('01-10-2013', 'DD-MM-YYYY')))
    );
    
    

    If you do not use the model suggested subpartition approach be "someoneelse" then you have a few syntax errors to fix. I think that the following is correct:

    (

    PARTITION P1 VALUES LESS THAN (TO_DATE (JANUARY 10, 2013 ',' DD-MM-YYYY ""))

    (

    SUBPARTITION SP_A VALUES ('A'),

    SUBPARTITION SP_B VALUES ('B')

    )

    )

    Concerning

    Jonathan Lewis

  • A simple stored procedure - select with an if statement returning a cursor

    Hello

    I am creating a simple stored procedure, but having never worked with them, before that I'm not sure what I'm doing wrong.

    Here is my code:

    create or replace
    procedure contact_return(
        v_contact_id IN varchar2,
        p_cursor OUT SYS_REFCURSOR)
    AS
    begin
    
      set sql_statement varchar2(4000) := '
        SELECT URN,
          FIRSTNAME,
          LASTNAME,
          TITLE,
          CREATED_DT,
          AREA_URN,
          MOBILE,
          WORK,
          EMAIL,
          ORG_NAME,
          ADDRESS,
          POSTCODE,
          IN_USE
        FROM CONTACT';
        
      if v_contact_id is not null then
        sql_statement := sql_statement || ' where urn = ' || v_contact_id;
      end if;
      
      open p_cursor for sql_statement;
    end;
    

    It is actually 2 errors:

    • Error (7.3): PL/SQL: statement ignored
    • Error (7.7): PL/SQL: ORA-00922: missing or invalid option

    That seems to be a problem with my line fixed sql_statement, but it looks good for me?

    Thank you

    Do not know what language you are trying to use there for your variable declarations, but it is not PL/SQL.  Looks like you're mixing SQL * more syntax with PL/SQL UltraLite or something.

    Something more in this sense is perhaps what you are looking for...

    create or replace procedure contact_return (v_contact_id IN varchar2

    p_cursor ON SYS_REFCURSOR

    ) AS

    sql_statement varchar2 (4000): = '

    SELECT THE URN,

    FIRST NAME,

    LASTNAME,

    TITLE,

    CREATED_DT,

    AREA_URN,

    MOBILE,

    WORK,

    E-mail

    NOM_ORG,

    ADDRESS,

    Zip code

    IN_USE

    CONTACT

    where urn = nvl(:1,urn)';

    Start

    Open the p_cursor for sql_statement using v_contact_id;

    end;

  • Does not not special characters in the password

    Here's the function I used to apply the oracle password. I can able to use all the numbers, characters, but when I use special as cat (punctarray: ='!) » #$% & ()'' * +,-/ : ; <>=? _';) I can able to use only the characters # when I'm with all the other amazing it gives me an error


    SQL > alter user u1 identified by nira86 #* wad456j;
    change the u1 user identified by nira86 #* wad456j
    *
    ERROR on line 1:
    ORA-00922: missing or not valid option



    Here's the function

    FUNCTION to CREATE or REPLACE verify_function
    (username varchar2,
    password varchar2,
    VARCHAR2 old_password of past)
    RETURNS boolean IS
    Boolean n;
    whole m;
    different integer;
    Boolean IsDigit;
    because Boolean;
    ispunct Boolean;
    digitarray varchar2 (20);
    punctarray varchar2 (25);
    CharArray varchar2 (52);

    BEGIN
    digitarray: = "0123456789";
    CharArray: = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ ';
    punctarray: ='! » #$% & ()'' * +,-/ : ; <>=? _';

    -Check if the password is the same as the user name
    IF (password) NLS_LOWER = NLS_LOWER (username) THEN
    raise_application_error ("-20001, ' identical or similar to the user password");
    END IF;

    -The minimum length of the password checking
    IF (password) length < 15 THEN
    raise_application_error (-20002, 'length of less than 15 password');
    END IF;

    -Check if the password is too simple. A dictionary of words can be
    -maintained and can be verified so does not allow the words
    -which are too simple for the password.
    IF NLS_LOWER (password) IN ('Welcome', 'database', 'account', 'user', 'password', 'oracle', 'PC', 'abcd') THEN
    raise_application_error ('-20002, ' simple password ');
    END IF;

    -Check if the password contained at least a letter, a number and a
    -punctuation mark.
    -- 1. Check for the digit
    IsDigit: = FALSE;
    m: = length (password);
    FOR I IN 1.10 LOOP
    FOR j IN LOOP 1.m
    IF substr (password, j, 1) = substr(digitarray,i,1) THEN
    IsDigit: = TRUE;
    GOTO findchar;
    END IF;
    END LOOP;
    END LOOP;
    IF IsDigit = FALSE THEN
    raise_application_error (-20003, 'password must contain at least one digit, a character and a punctuation');
    END IF;
    -- 2. Check the character
    < < findchar > >
    car: = FALSE;
    FOR i IN 1.length (chararray) LOOP
    FOR j IN LOOP 1.m
    IF substr (password, j, 1) = substr(chararray,i,1) THEN
    car: = TRUE;
    GOTO findpunct;
    END IF;
    END LOOP;
    END LOOP;
    Because IF = FALSE THEN
    raise_application_error (-20003, ' password must contain at least one------)
    Figure, a character and a punctuation ');
    END IF;
    -- 3. Search for punctuation
    < < findpunct > >
    ispunct: = FALSE;
    FOR i IN 1.length (punctarray) LOOP
    FOR j IN LOOP 1.m
    IF substr (password, j, 1) = substr(punctarray,i,1) THEN
    ispunct: = TRUE;
    GOTO endsearch;
    END IF;
    END LOOP;
    END LOOP;
    Ispunct IF = FALSE THEN
    raise_application_error (-20003, ' password must contain at least one------)
    Figure, a character and a punctuation ');
    END IF;

    < < endsearch > >
    -Check if the password is different from the previous password at least
    -3 letters
    Old_password past IF IS NOT NULL THEN
    differ: = length (old_password) - length (password);

    IF abs (differ) < 3 THEN
    IF (password) length < length (old_password) THEN
    m: = length (password);
    ON THE OTHER
    m: = length (old_password);
    END IF;

    differ: = abs (differ);
    I'm IN 1.m LOOP
    IF substr (password, i, 1). = substr(old_password,i,1) THEN
    differ: = differ + 1;
    END IF;
    END LOOP;

    IF different < 3 THEN
    raise_application_error (-20004, ' password should differ by to)
    (minimum 3 characters);
    END IF;
    END IF;
    END IF;
    -Everything all right; Return TRUE;
    RETURN (TRUE);
    END;
    /

    What version of Oracle are you using? Before 11 g I think only allowed special characters were '_', ' $' and ' # '.

    And 11 g, you need to put the password in quotation marks and must not use comma, backslash or double quote.

  • Password Oracle 11r2 with non-alphanumeric characters

    Spec: Windows 2008, Oracle 11 g 2

    Problem: create userme identified by myp * ssword!
    I'm trying to create a user name with a password with some of the non-alphanumeric characters, but get the error:
    ERROR at line 1:
    ORA-00922: missing or not valid option
    the error is non-alphanumeric characters (* AND!)

    Any idea and soluton would be appreciated.

    The * character is not allowed, check http://docs.oracle.com/cd/B28359_01/server.111/b28337/tdpsg_user_accounts.htm#BEICECGF "Requirements to create passwords" for more details.

    Published by: 197652048902 on June 7, 2012 20:44

    Published by: 197652048902 on June 7, 2012 20:46

  • create the list-range partition table

    Database version: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi

    I am trying to create a partition with beach-LIST table, and I get this error message, is the oracle 10.2.0.4 database supports to create the list range (composite) score


    {
    SQL > CREATE TABLE tbp_list_range
    (
    DATE OF REPORT_DATE,
    member_id_01 varchar2 (2),
    Date of DATE_SERVICE,
    member_id varchar2 (15)
    )
    PARTITION OF LIST (member_id_01)
    SUBPARTITION BY RANGE (DATE_SERVICE)
    (
    PARTITION SPTYR04M01_C VALUES ('AA', 'aa')
    NOLOGGING
    COMPRESS)
    SUBPARTITION PTYR12M011 VALUES LESS THAN (TO_DATE (' 2012-01-01 00:00:00 ',' SYYYY-MM-DD HH24:MI:SS ',' NLS_CALENDAR = GREGORIAN ')),
    SUBPARTITION PTYR12M021 VALUES LESS THAN (TO_DATE (' 2012-02-01 00:00:00 ',' SYYYY-MM-DD HH24:MI:SS ',' NLS_CALENDAR = GREGORIAN ')),
    SUBPARTITION recent1 VALUES LESS THAN (MAXVALUE)
    ),
    PARTITION SPTYR04M01_Yo VALUES ('BJ', 'bj')
    NOLOGGING
    COMPRESS)
    SUBPARTITION PTYR12M01 VALUES LESS THAN (TO_DATE (' 2012-01-01 00:00:00 ',' SYYYY-MM-DD HH24:MI:SS ',' NLS_CALENDAR = GREGORIAN ')),
    SUBPARTITION PTYR12M02 VALUES LESS THAN (TO_DATE (' 2012-02-01 00:00:00 ',' SYYYY-MM-DD HH24:MI:SS ',' NLS_CALENDAR = GREGORIAN ')),
    SUBPARTITION recent2 VALUES LESS THAN (MAXVALUE)
    )
    )
    /
    SUBPARTITION BY RANGE (DATE_SERVICE)
    *
    ERROR on line 9:
    ORA-00922: missing or not valid option


    SQL > select * from v version $;

    BANNER
    ----------------------------------------------------------------
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
    PL/SQL Release 10.2.0.4.0 - Production
    CORE 10.2.0.4.0 Production
    AMT for Linux: release 10.2.0.4.0 - Production
    NLSRTL Version 10.2.0.4.0 - Production

    }

    Any help would be greatly appreciated.

    Thank you

    There are no ladders of partitioning in 10g either.

    Have a look here for partitioning methods: http://www.orafaq.com/wiki/Composite_partitioning

  • Number of the external table... probably simple

    Hi guys,.

    just mucking around with external tables for the first time after meeting a couple of discussions on the subject recently.

    I'm in Oracle Database 11 g Enterprise Edition Release 11.2.0.2.0 - Production

    in SYS, I did the following:
    create or replace directory test_dir as '\home\oracle';
    grant read, write on directory test_dir to hr;
    now as HR, I do the following:
    create table ext_test (id number, empname varchar2(100),rate number)
    organisation external (type ORACLE_LOADER
                          default directory TEST_DIR
                          access parameters (records delimited by NEWLINE
                                          fields terminated by ','
                                          optionally enclosed by '"'
                                          missing field values are null
                                          reject rows with all null fields
                                         (id, empname, rate) ) 
    location ('test_file.csv'));
    and get the following:
    SQL> @createexttab
    organisation external (type ORACLE_LOADER
    *
    ERROR at line 2:
    ORA-00922: missing or invalid option
    What'm screwing?

    Samir says:
    Hi guys,.
    What'm screwing?

    spelling

    EXTERNAL ORGANIZATION

  • creating a package in sql * more

    Hello all;

    Do you know what the problem with that statement
    SQL> create or replace pkg_initial_comment as procedure save_initial_comment(p_i
    d number, p_first_name varchar2, p_last_name varchar2, p_comment varchar2, p_dat
    e date); end save_initial_comment; create or replace package body pkg_initial_co
    mment as procedure save_initial (p_id number, p_comments varchar2, p_first_name
    varchar2, p_last_name varchar2, p_date date) is begin insert into initial_commen
    ts values (1, p_first_name, p_last_name, p_comment, sysdate); end save_initial;
    end pkg_initial_comment;
    create or replace pkg_initial_comment as procedure save_initial_comment(p_id num
    ber, p_first_name varchar2, p_last_name varchar2, p_comment varchar2, p_date dat
    e); end save_initial_comment; create or replace package body pkg_initial_comment
     as procedure save_initial (p_id number, p_comments varchar2, p_first_name varch
    ar2, p_last_name varchar2, p_date date) is begin insert into initial_comments va
    lues (1, p_first_name, p_last_name, p_comment, sysdate); end save_initial; end p
    kg_initial_comment
    I get the following error message

    ORA-00922:

    and my table structure is less than
    create table initial_comment (id number(30),
    first_name varchar2(4000), last_name varchar2(4000), create_date date);

    're missing you the keyword package after first replace.

    Good bye
    DPT

  • rwserver.conf cannot be parsed

    Dear Experts,

    I'm havging a reportserver dedicated for scheduled tasks, where I have to configure printers. some of the few reports that send directly to the printer. We have about 5 + printer where I am able to configure.

    System: Weblogic 10.3.4/Porat,Forms,Reports and discoverer 11 g/Enterprise Linux 5

    Here it is given two queue I get "cannot parse error when I configured and restart the report server.
    ************************************************************************************
    0-NO-PRINT [when the user don't want to print the output that they will use this queue name to write in pdf format]
    1 B 150-A3-COLOR acceptants requests since Friday, April 29, 2011 03:10:57 EST

    I have no analysis for the following printer error
    **********************************
    SC-Audit1-KM360 acceptants requests since Monday, August 29, 2011 01:57:53 pm
    SC-ITM1-KM360 accepting visits since 20 Sep 2011 Mar 01:20:12 pm
    SC-StuAd1-KM353 acceptants requests since Tuesday, August 30, 2011 03:53:30 EST
    SC-StuAd2-KM360 acceptants requests since Monday, August 29, 2011 01:57:21 pm


    Error log *.
    [2011 09-21 T 21: 56:18.678 + 10:00] [reports] [NOTIFICATION] [] [oracle.reports.server] [tid: 10] [ecid: 0000JABpzLrDScsrcgU4U51EUT3Y000001, 0] ServerConfig:open server config file /uc01/app/oracle/middleware/asinst_1/config/ReportsServerComponent/repjbssisdev/rwserver.conf cannot be parsed. [[
    Invalid value ' 0 - NON - PRINT' for attribute: "id".
    Online: 53: column: 30
    .
    ]]
    [2011 09-21 T 21: 56:18.681 + 10:00] [reports] [INCIDENT_ERROR] [REP-56126] [oracle.reports.server] [tid: 10] [ecid: 0000JABpzLrDScsrcgU4U51EUT3Y000001, 0] REP-56126: server config file /uc01/app/oracle/middleware/asinst_1/config/ReportsServerComponent/repjbssisdev/rwserver.conf cannot be parsed. [[
    Invalid value ' 0 - NON - PRINT' for attribute: "id".
    Online: 53: column: 30
    .
    oracle.reports.RWException: IDL:oracle/reports/RWException:1.0
    at oracle.reports.utility.Utility.newRWException(Utility.java:1053)
    at oracle.reports.server.ServerConfig.open(ServerConfig.java:400)
    at oracle.reports.server.RWServer.startServer(RWServer.java:784)
    at oracle.reports.server.RWServer.jniMain(RWServer.java:305)

    ]]
    [2011 09-21 T 21: 56:19.787 + 10:00] [reports] [NOTIFICATION] [] [oracle.reports.server] [tid: 10] [ecid: 0000JABpzbBDScsrcgU4U51EUT3Z000001, 0] ServerConfig:open server config file /uc01/app/oracle/middleware/asinst_1/config/ReportsServerComponent/repjbssisdev/rwserver.conf cannot be parsed. [[
    Invalid value ' 0 - NON - PRINT' for attribute: "id".
    Online: 53: column: 30
    .
    ]]
    [2011 09-21 T 21: 56:19.789 + 10:00] [reports] [INCIDENT_ERROR] [REP-56126] [oracle.reports.server] [tid: 10] [ecid: 0000JABpzbBDScsrcgU4U51EUT3Z000001, 0] REP-56126: server config file /uc01/app/oracle/middleware/asinst_1/config/ReportsServerComponent/repjbssisdev/rwserver.conf cannot be parsed. [[
    Invalid value ' 0 - NON - PRINT' for attribute: "id".
    Online: 53: column: 30
    .
    oracle.reports.RWException: IDL:oracle/reports/RWException:1.0
    at oracle.reports.utility.Utility.newRWException(Utility.java:1053)
    at oracle.reports.server.ServerConfig.open(ServerConfig.java:400)
    at oracle.reports.server.RWServer.startServer(RWServer.java:784)
    at oracle.reports.server.RWServer.jniMain(RWServer.java:305)

    ]]
    [2011 09-21 T 21: 56:20.763 + 10:00] [reports] [NOTIFICATION] [] [oracle.reports.server] [tid: 10] [ecid: 0000JABpzqRDScsrcgU4U51EUT3 ^ 000001, 0] ServerConfig:open server config file /uc01/app/oracle/middleware/asinst_1/config/ReportsServerComponent/repjbssisdev/rwserver.conf cannot be parsed. [[
    Invalid value ' 0 - NON - PRINT' for attribute: "id".
    Online: 53: column: 30
    .
    ]]


    Thanks in advance
    Salai

    Just a wild guess: do not start the name with a number. Maybe it has nothing to do with it, but Oracle can be difficult in this regard:

    SQL> alter user scott identified by 0tiger;
    alter user scott identified by 0tiger
                                    *
    ERROR at line 1:
    ORA-00922: missing or invalid option
    

Maybe you are looking for