ASM > ALTER DISKGROUP > error: ORA-00905: lack of keyword

Oracle 10.2.0.3.0 on RHEL 5 database

SQL > create diskgroup data4
external redundancy 2
3 disc "ORCL:DATA4";

DiskGroup created.

SQL > ALTER DISKGROUP DATA4 SET the ATTRIBUTE "compatible.rdbms" = "10.1 ';
ALTER DISKGROUP DATA4 SET the ATTRIBUTE "compatible.rdbms" = "10.1 '."
*
ERROR on line 1:
ORA-00905: lack of keyword


Is not the correct syntax? Please help... Thank you!

SQL > alter diskgroup DATA4 set attribute "au_size" = "4 M";
alter diskgroup DATA4 set attribute "au_size" = "4 M"
*
ERROR on line 1:
ORA-00905: lack of keyword

CipherDBA wrote:
Hi, Aman-

I have check the syntax before posting this message. I always get the error message, even if I believe that my syntax is correct.

SET the ATTRIBUTE 'attributeName' = "attribute_value".

Have you seen my 2nd answer where I asked that you are sure that 4 M size to THE East actually possible in 10g ASM (10203 your version) as far as I KNOW, this has begun to 11.1 from which can reach the size of the AU to a default value of 1 M 64 M. And this must explain the reason why your order is a failure since it was added in 11.1 Reference sql of the DSO. See 2nd link I gave.

Aman...

Tags: Database

Similar Questions

  • Help with query - get an ERROR: ORA-00905: lack of keyword

    Can someone help me understand what the problem with this query? Thank you

    Deanna



    Select last_name. «, » || first name
    in motor_assist2 (technician1_name)
    of org1
    where radionum =: p2_technician1_radio;

    Maybe this:

    insert into motor_assist2 (technician1_name)
    select last_name||','||first_name
    from org1
    where radionum=:p2_technician1_radio;
    
  • Query cannot be parsed in the generator. If you believe that your query is syntactically correct, check the generic "columns" box below the source of the region without analysis. ORA-00905: lack of keyword

    Hi all

    I have create report sql in version 4.2, and now we have apex version 5.0 upgrade.

    I encountered error when I change the State of sql

    The error massage:

    Query cannot be parsed in the generator. If you believe that your query is syntactically correct, check the generic "columns" box below the source of the region without analysis. ORA-00905: lack of keyword

    My SQL

    SELECT VW.*

    , CASE WHEN (VW.file_code is null

    OR VW.cancel_flg = 'Y'

    OR (TOUR_DEP_DATE + GET_FILE_LOCKING_DAYS (VW. (SBU_CODE) < = trunc (sysdate))

    ) THEN

    ' < font color = "Red" > < b > other < /b > < / police > '

    ON THE OTHER

    "< a href =" f? p = & APP_ID.:51: & SESSION. : O PR: & DEBUG. : 51:P51_FILE_CODE, P51_COSTING_CODE, P51_TOUR_REG_NO, P51_VERSION_NO, P51_REQUEST, P51_AGENT_NAME, P51_ADULTS, P51_CHILDS, P51_MKT_CODE, P51_QUOT_CURR:'

    || FILE_CODE | «, » || COSTING_CODE | «, » || TOUR_REG_NO | «, » || VERSION_NO | «, » ||' OPR' | «, » || AGENT_CODE | «, » || VW. FROM_PAX | «, » || 0||','|| VW.mkt_code | ',' | VW. QUOT_CURR |': ' > < font color = blue > < b > other < /b > < / police > '. "

    END as "other Actions".

    , CASE WHEN ((VW.file_code is not null AND TOUR_DEP_DATE + GET_FILE_LOCKING_DAYS (VW. (SBU_CODE) < = TRUNC (SYSDATE))

    OR cancel_flg = 'Y '.

    OR (VW. REF_COSTING_CODE = VW. ADDL_FIELD2 AND VW. ADDL_FIELD1 LIKE '% COPIED FROM % OF APPROVAL'

    AND BOOKING_NAME LIKE "%-Backup")

    ) THEN

    ' < font color = "Red" > < b > edit < /b > < / police > '

    ON THE OTHER

    "< a href =" f? p = & APP_ID.:149: & SESSION. : & DEBUG. : 149:P149_COSTING_CODE:'

    || COSTING_CODE |': ' > < font color = blue > < b > edit < /b > < / police > '. "

    END AS 'Edit '.

    , CASE WHEN (Nvl (cancel_flg, 'n') = 'Y')

    )

    THEN

    ' < font color = "Red" > < b > add < /b > < / police > '

    ON THE OTHER

    "< a href =" f? p = & APP_ID.:33: & SESSION. : & DEBUG. : 33:P33_COSTING_CODE, P33_FILE_CODE, P33_MKT_CODE, P33_QUOT_CURR, P33_NO_OF_ADULT, P33_NO_OF_CHILD:'

    || COSTING_CODE | «, » || file_code | «, » || VW.mkt_code | ',' | VW. QUOT_CURR | «, » || VW. FROM_PAX | «, » || 0 | ': "> < font color = blue > < b > add < /b > < / police > '

    END as 'Services '.

    OF TOUR_MAS_VW VW

    How to solve it.

    Thank you

    Dear friends

    Thanks for your helping hands.

    I found the solution for this. We can solve this problem by using these solutions

    • A region of HTML:

      click me
      
    • Using PL/SQL:
      htf.anchor('f?p=100:5:'||V('APP_SESSION'),'click me');
      
    • Using a SQL query: SELECT htf.anchor('f?p=100:5:'||:APP_SESSION,'clickme') FROM DUAL;

    We can write the query in the form

    SELECT ' f? p = 100: 1 :'|| : APP_SESSION |': ' | : APP_UNIQUE_PAGE_ID |

    ': P1_EMPNO :'|| employe_id,

    first name,

    job_id

    Employees

    Thank you & best regards

    CORINE

  • ORA-00905: lack of keyword

    Hi all


    CREATE OR PACKAGE BODY ORDER_MANAGEMENT IS




    FUNCTION GETERROR (ERRORCODE NUMBER) RETURN VARCHAR2
    IS
    V_ERRORDESC VARCHAR2 (500)
    Error on line 1
    ORA-00905: lack of keyword
    V_ERRORCODE NUMBER (10);
    Error on line 9
    ORA-00900: invalid SQL statement
    CURSOR TEST_ERROR IS
    Error on line 10
    ORA-00900: invalid SQL statement
    SELECT TEXTE_ERREUR
    OF API_ERRORS
    WHERE ERROR_CODE = V_ERRORCODE
    *
    Error on line 3
    ORA-00904: "V_ERRORCODE": invalid identifier

    Any idea?

    Kai

    Line

    V_ERRORDESC VARCHAR2 (500);

    missing a semicolon.

    SY.

  • DBMS_ADVANCED_REQRITE get ORA-00905: lack of keyword

    What I'm doing wrong here?
    17:17:29 NJ3417@pubd1> create table test_a (col_a varchar2(20));
    
    Table created.
    
    Elapsed: 00:00:00.04
    17:17:55 NJ3417@pubd1> insert into test_a values('Red');
    
    1 row created.
    
    Elapsed: 00:00:00.02
    17:18:09 NJ3417@pubd1> create table test_b (col_b varchar2(20));
    
    Table created.
    
    Elapsed: 00:00:00.02
    17:18:32 NJ3417@pubd1> insert into test_b values('Blue');
    
    1 row created.
    
    Elapsed: 00:00:00.03
    17:18:55 NJ3417@pubd1> commit;
    
    Commit complete.
    
    17:34:56 NJ3417@pubd1> begin
    17:34:56   2    sys.dbms_advanced_rewrite.declare_rewrite_equivalence(
    17:34:56   3           name => 'Mikes SQL override',
    17:34:56   4           source_stmt => 'SELECT col_a FROM test_a',
    17:34:56   5           destination_stmt => 'SELECT col_b FROM test_b',
    17:34:56   6           validate => FALSE);
    17:34:56   7  end;
    17:34:56   8  /
    begin
    *
    ERROR at line 1:
    ORA-00905: missing keyword
    ORA-06512: at "SYS.DBMS_ADVANCED_REWRITE", line 29
    ORA-06512: at "SYS.DBMS_ADVANCED_REWRITE", line 185
    ORA-06512: at line 2
    
    17:54:18 NJ3417@pubd1> select * from v$version;
    
    BANNER
    --------------------------------------------------------------------------------
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    PL/SQL Release 11.2.0.3.0 - Production
    CORE    11.2.0.3.0      Production
    TNS for Solaris: Version 11.2.0.3.0 - Production
    NLSRTL Version 11.2.0.3.0 - Production
    
    5 rows selected.
    Thank you
    Mike

    mtefft wrote:
    What I'm doing wrong here?

    I don't have your exact version but I think that you can't have any string as the name of the rewrite rule. Refer to the documentation
    Here's the working example:

    SQL> select * from v$version ;
    
    BANNER
    --------------------------------------------------------------------------------
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
    PL/SQL Release 11.2.0.1.0 - Production
    CORE    11.2.0.1.0      Production
    TNS for Linux: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - Production
    
    SQL> create table test_a (col_a varchar2(20));
    
    Table created.
    
    SQL> insert into test_a values('Red');
    
    1 row created.
    
    SQL> create table test_b (col_b varchar2(20));
    
    Table created.
    
    SQL> insert into test_b values('Blue');
    
    1 row created.
    
    SQL> commit ;
    
    Commit complete.
    
    SQL> select col_a from test_a ;
    
    COL_A
    --------------------
    Red
    
    SQL> select col_b from test_b ;
    
    COL_B
    --------------------
    Blue
    
    begin
      sys.dbms_advanced_rewrite.declare_rewrite_equivalence(
           name => 'Mikes SQL override',
           source_stmt => 'SELECT col_a FROM test_a',
           destination_stmt => 'SELECT col_b FROM test_b',
           validate => FALSE);
    end;
      8  /
    begin
    *
    ERROR at line 1:
    ORA-00905: missing keyword
    ORA-06512: at "SYS.DBMS_ADVANCED_REWRITE", line 29
    ORA-06512: at "SYS.DBMS_ADVANCED_REWRITE", line 185
    ORA-06512: at line 2
    
    begin
      sys.dbms_advanced_rewrite.declare_rewrite_equivalence(
           name => 'myrule',
           source_stmt => 'SELECT col_a FROM test_a',
           destination_stmt => 'SELECT col_b FROM test_b',
           validate => FALSE);
    end;
      8  /
    
    PL/SQL procedure successfully completed.
    
    SQL> show parameter rewrite
    
    NAME                                 TYPE        VALUE
    ------------------------------------ ----------- ------------------------------
    query_rewrite_enabled                string      TRUE
    query_rewrite_integrity              string      enforced
    SQL> alter session set query_rewrite_integrity=trusted ;
    
    Session altered.
    
    SQL> show parameter rewrite
    
    NAME                                 TYPE        VALUE
    ------------------------------------ ----------- ------------------------------
    query_rewrite_enabled                string      TRUE
    query_rewrite_integrity              string      TRUSTED
    
    SQL> select col_a from test_a ;
    
    COL_A
    --------------------
    Blue
    
  • ORA-00905: lack of keyword against APEX

    Hello
    can someone explain my what is the problem with this query:

    drop table emp_by_dept;

    SELECT b.EMPLOYEE_ID, b.DEPARTMENT_ID IN emp_by_dept
    Of
    (SELECT EMPLOYEE_ID, DEPARTMENT_ID
    Of oehr_employees
    WHERE department_id = 30) b;


    Gived by subqyery results

    SELECT EMPLOYEE_ID, DEPARTMENT_ID
    Of oehr_employees
    WHERE department_id = 30

    are:

    EMPLOYEE_ID DEPARTMENT_ID
    30 114
    30 115
    30 116
    30 117
    30 118
    30 119

    Download 6 lines returned in 0.02 seconds

    As Blushadow says, select... in the syntax is used to select a single value in a variable, you cannot use it to create a table. This is the SQL Server syntax. If you want to really drop and re-create the table every time, then the correct syntax is:

    drop table emp_by_dept;
    
    create table emp_by_dept as
    SELECT EMPLOYEE_ID, DEPARTMENT_ID
    FROM oehr_employees
    WHERE department_id = 30;
    

    However, even once, as Blushadow pointed out, it is useless and generally considered bad practice in Oracle. You should either create the emp_by_dept once, like an ordinary table, then truncate and insert new data, or create table emp_by_dept once in a global temporary Table, and then use the TWG in what it is you do.

    Who know that, my feeling is that it is extremely unlikely that you really need the emp_by_dept at all. In Oracle, the readers do not block writers, therefore, in most cases, you can simply use the selection from oehr_employees directly whenever you use emp_by_dept.

    John

  • ERROR: ORACLE prepare error: ORA-00936: lack of expression

    Hello

    I am required to run the 'pass-through' Oracle SQL, to extract data from tables in the SAS for processing and handling. My code (attached) reads and writes (runs) but with zero records to test first. I can't get beyond the error to prepare.

    The request is just like other queries that seem to work, but I can't get past this prepare error. I have no other access to individauls with an adequate knowledge of the PL SQL and as a last stop hoped others in the forum could quickly identify the source of the error.

    Thank you very much in advance for any help.

    Jeff
    _______________________________________

    1; *'; * « ; * / ; Quit; execution risk;
    2 OPTIONS NUMPAGE = MIN;
    3% LET _CLIENTTASKLABEL = % NRBQUOTE (rx_biplr_v3_2);
    4% LET _EGTASKLABEL = % NRBQUOTE (rx_biplr_v3_2);
    5% LET _CLIENTPROJECTNAME = %NRBQUOTE();
    6% LET _SASPROGRAMFILE =;
    7
    8 ODS CLOSE SUBJECT;
    NOTE: Some of your options or statements will not be managed with the Activex or Java Series devices. Chart by default for these
    drivers may be different from other SAS/GRAPH device drivers. For more information, please contact Technical Support.
    9 OPTIONS DEV = ACTIVEX;
    10 EGHTML TEMP FILE NAME;
    NOTE: Writing, body HTML (EGHTML) file: EGHTML
    11 ODS HTML(ID=EGHTML) FILE = EGHTML ENCODING = 'utf - 8' STYLE = EGDefault.
    11. STYLESHEET=(URL="file:///C:/program%20Files/SAS/shared%20Files/BIClientStyles/EGDefault.CSS")
    11. ATTRIBUTES = ("http://www2.sas.com/codebase/graph/v91/sasgraph.exe"="CODE") NOGTITLE NOGFOOTNOTE GPATH = & sasworklocation
    11.
    12
    gaccessible 13%;
    14 /********************************************************/
    15 * RX_BIPLR_V3. SAS;
    16 /********************************************************/
    17
    18 dm 'journal clearly out; delete ";
    19 linesize options = 120;
    20 option obs = 0 NoReplace;
    21
    22 ****************************************************************************************;
    23 * date reviewed programmer in WHICH WAS MADE;
    24 *----- -------------- ------------ -----------------------------------------;
    25 * 2005 creation of David Boyd program to the test population;
    26 *;
    27 * 06/02/2006 Ivon Jones changed to include the whole of the population;
    28 *;
    29 * 20/07/2006 Ivon Jones identified the holdout data elements;
    30 * or inclusion in the consolidation with;
    31 * Robin report;
    32 *;
    33 * 18/08/2006 Ivon Jones updated specific therapeutic Classes.
    34 * 10 - 2009 J Shaf - changed to extract actual or potential of UBH bipolar Dx and medical claims.
    35 ****************************************************************************************;
    36
    37
    38
    39 * % let allclmorgn = (', 'A'); / * claims origin code * /.
    40% would let begdate ='01 SEP 2009;
    41% let enddate = 30 SEP 2009 would be;
    42% let q = %str(%');
    43
    44
    45 data _null_;
    46. call symput ("fdos", put (intnx ('month' ' and begdate "d,-27," starts"), date9.));
    47 call symput ('ldos', put (intnx ('months', ' and enddate "d-0, 'end'" "), date9.));
    48, run;

    NOTE: DATA statement used (total duration of processes):
    time real 0.01 seconds
    2 the system SAS 11:44 Friday, October 30, 2009

    time CPU 0.01 seconds


    49
    50
    51
    52 **************************************************************;
    53 *? Data _null_ stage allows to create a macro variable to;
    54 * year and month, based on the macro ldos variable in the data;
    55 * step up? ;
    56 **************************************************************;
    57
    58
    59 data _null_;
    If 60 months ("& ldos" d) < 10
    61, then call symput ("yr_mo", compress (year ("& ldos" d) |)) '0' || months ("& ldos" d)));
    62 other call symput ("yr_mo", compress (year ("& ldos" d) | months ("& ldos" d)));
    63 to run;

    NOTE: The numeric values were converted to character values in the locations given by: (Line): (Column).
    61:39 61:64 62:39 62:57
    NOTE: DATA statement used (total duration of processes):
    time real 0.01 seconds
    time processor 0.01 seconds


    64
    65 * make % & biplr_dx;
    position 66% & begdate;
    ' 01 SEP 2009 would be
    67% put & enddate;
    30 SEP 2009 would be
    68% put & fdos;
    JUNE 1, 2007
    69% put & ldos;
    SEPTEMBER 30, 2009
    70% put & q;
    '
    71
    72
    73 libname biplr ' / home/jshafi01/projects/adhoc/biplr_dprsn/data ';
    NOTE: Libref BIPLR has been awarded with success as follows:
    Engine: V9
    Physical name: / home/jshafi01/projects/adhoc/biplr_dprsn/data
    74 rosdwp libname = oracle user "& oracle_user." pass = "& oracle_pass." ' buffsize = 32767 path = "rosdwp"; "
    NOTE: Libref ROSDWP has been awarded with success as follows:
    Engine: ORACLE
    Physical name: rosdwp
    75
    work.biplr_up_v1 76 data;
    mbr_id length 77 attrib = $ 26;
    78 the value biplr.biplr_ubh_med_v1;
    79 to be performed;

    NOTE: There were 0 read comments from the BIPLR data set. BIPLR_UBH_MED_V1.
    NOTE: All data WORK. BIPLR_UP_V1 has 0 comments and variables 1.
    NOTE: DATA statement used (total duration of processes):
    time real 0.01 seconds
    3 the system SAS 11:44 Friday, October 30, 2009

    time processor 0.01 seconds


    80
    81 proc content;
    82 to be performed;

    NOTE: PROCEDURE used CONTENT (total duration of processes):
    time real 0.03 seconds
    time CPU 0.03 seconds


    83
    84 proc datasets
    85 = rosdwp nolist library.
    86. delete biplr_up_v1;
    87 of quitting;

    NOTE: The removal of ROSDWP. BIPLR_UP_V1 (memtype = DATA).
    NOTE: PROCEDURE used DATASETS (time Total of processes):
    time real 3.74 seconds
    time CPU 0.03 seconds


    88
    89 proc datasets
    90 = work nolist library.
    copy 91 = rosdwp move;
    92 select biplr_up_v1;
    93 of quitting;

    NOTE: Move WORK. BIPLR_UP_V1 to ROSDWP. BIPLR_UP_V1 (memtype = DATA).
    NOTE: Variable labels SAS, formats and lengths are not written to the DBMS tables.
    NOTE: There were 0 read comments from the WORKING data set. BIPLR_UP_V1.
    NOTE: All the data ROSDWP. BIPLR_UP_V1 has 0 comments and variables 1.
    NOTE: PROCEDURE used DATASETS (time Total of processes):
    real 0.32 seconds
    time CPU 0.04 seconds


    94
    95
    96
    97 *****************************************************************************;
    98
    99 * execute (commit) by rosdwp
    100 ******************************************************************************;
    101
    102
    103 proc SQL noprint.
    104, connect to oracle as rosdwp (user = "" & oracle_user. "password =" "& oracle_pass ' buffsize = 32767 path ="rosdwp")
    104. preserve_comments);
    run 105 (alter session set nls_date_format = 'ddmonyyyy') by rosdwp;
    CREATE table biplr_rx like 106
    107 SELECT
    mrb_id 108,
    pcp_spc 109,
    rx_date 110,
    4 the system SAS 11:44 Friday, October 30, 2009

    Mark 111,
    generic, 112
    113 ahfs_cd
    ahfs_dsc 114,
    lbl 115,
    strngth 116,
    UNT 117,
    spc_tx_cls_cd 118,
    119 spc_tx_cls_dsc,
    GCN 120,
    rx_num 121,
    rx_ingrd 122,
    rx_paid 123,
    rx_cnt 124,
    rx_qty 125,
    rx_day 126
    127 rosdwp CONNECTION
    128 (SELECT
    129, middle of the year. UNIQ_MBR_ID as mrb_id,
    130 DB. PRVDR_SPCLTY_DESC as pcp_spc,
    FCP 131. LAST_SRVC_DT as rx_date,
    132 JJ. BRAND_NAME as mark,
    133 JJ. GNRC_NAME as generic,
    134 JJ. AHFS_THRPTC_CLS_CD as ahfs_cd,
    DD 135. AHFS_THRPTC_CLS_DESC as ahfs_dsc,
    136 JJ. LABEL_NAME as lbl,
    137 JJ. STRNGTH_NUM as strngth
    138 JJ. STRNGTH_UNIT_DESC as unt,
    139 JJ. SPECF_THRPTC_CLS_CD as spc_tx_cls_cd,
    140 DD. SPECF_THRPTC_CLS_DESC as spc_tx_cls_dsc,
    141 JJ. GCN_NUM as gcn,
    FCP 142. PRSCRPTN_NUM as rx_num,
    SUM of 143 (FCP. INGRDNT_AMT) as rx_ingrd,
    SUM of 144 (FCP. PD_AMT) as rx_paid,
    $ 145 (FCP. UNIT_SRVC_CNT) as rx_cnt,
    SUM of 146 (FCP. DSPNSD_QTY) as rx_qty,
    SUM of 147 (FCP. DAY_SUPLY_CNT) as rx_day
    148
    149 PHRMCY_CLM_FACT pcf,
    150 MBR_ID_DMNSN environment,
    151 DRUG_DMNSN dd,
    152 PRVDR_DMNSN pd,
    153 biplr_up_v1
    154. WHERE THE
    (155)
    156 (biplr_up_v1.mbr_id = MBR_ID_DMNSN. UNIQ_MBR_ID) and
    157 (PHRMCY_CLM_FACT. FINL_CLM_KEY = PHRMCY_FINL_CLM_DMNSN. FINL_CLM_KEY) AND
    158 (PHRMCY_CLM_FACT. MBR_KEY = MBR_ID_DMNSN. MBR_KEY) and
    159 (PHRMCY_CLM_FACT. BNFT_KEY = MBR_BNFT_DMNSN. BNFT_KEY) and
    160 (PHRMCY_CLM_FACT. DRUG_KEY = DRUG_DMNSN. DRUG_KEY) and
    161 (PHRMCY_FINL_CLM_DMNSN. CLM_ORGN_CD IN (', 'A')) AND
    162 (PHRMCY_CLM_FACT. LAST_SRVC_DT BETWEEN q. & fdos. & q and & q. & ldos. & q)
    163)
    164 Group By
    165 mi. UNIQ_MBR_ID,
    166 pd. PRVDR_SPCLTY_DESC,
    FCP 167. LAST_SRVC_DT,
    168 JJ. BRAND_NAME,
    5 the system SAS 11:44 Friday, October 30, 2009

    169 JJ. GNRC_NAME,
    170 JJ. AHFS_THRPTC_CLS_CD,
    171 JJ. AHFS_THRPTC_CLS_DESC,
    172 JJ. LABEL_NAME,
    173 JJ. STRNGTH_NUM,
    174 JJ. STRNGTH_UNIT_DESC,
    175 JJ. SPECF_THRPTC_CLS_CD,
    176 JJ. SPECF_THRPTC_CLS_DESC,
    177 JJ. GCN_NUM,
    FCP 178. PRSCRPTN_NUM
    179);
    ERROR: ORACLE prepare error: ORA-00936: lack of expression. SQL statement: SELECT middle. UNIQ_MBR_ID as mrb_id,
    RDL PRVDR_SPCLTY_DESC like pcp_spc, FCP. LAST_SRVC_DT as rx_date, JJ. BRAND_NAME as brand, JJ. GNRC_NAME as generic,
    DD. AHFS_THRPTC_CLS_CD like ahfs_cd, JJ. AHFS_THRPTC_CLS_DESC as ahfs_dsc, JJ. LABEL_NAME as lbl, JJ. STRNGTH_NUM as
    strngth, JJ. STRNGTH_UNIT_DESC as unt, JJ. SPECF_THRPTC_CLS_CD as spc_tx_cls_cd, JJ. SPECF_THRPTC_CLS_DESC as
    spc_tx_cls_dsc, JJ. GCN_NUM as gcn, FCP. PRSCRPTN_NUM as rx_num, SUM (FCP. INGRDNT_AMT) as rx_ingrd, SUM (FCP. PD_AMT)
    as rx_paid, SUM (FCP. UNIT_SRVC_CNT) as rx_cnt, SUM (FCP. DSPNSD_QTY) as rx_qty, SUM (FCP. DAY_SUPLY_CNT) as rx_day
    OF PHRMCY_CLM_FACT pcf, MBR_ID_DMNSN mi, DRUG_DMNSN JJ, pd of the PRVDR_DMNSN, biplr_up_v1 () WHERE the
    (biplr_up_v1.mbr_id = MBR_ID_DMNSN. UNIQ_MBR_ID) and (PHRMCY_CLM_FACT. FINL_CLM_KEY =
    PHRMCY_FINL_CLM_DMNSN. FINL_CLM_KEY) AND (PHRMCY_CLM_FACT. MBR_KEY = MBR_ID_DMNSN. MBR_KEY) and
    (PHRMCY_CLM_FACT. BNFT_KEY = MBR_BNFT_DMNSN. BNFT_KEY) and (PHRMCY_CLM_FACT. DRUG_KEY = DRUG_DMNSN. DRUG_KEY) and
    (PHRMCY_FINL_CLM_DMNSN. CLM_ORGN_CD IN (', 'A')) AND (PHRMCY_CLM_FACT. LAST_SRVC_DT BETWEEN ' 01 JUN 2007"
    and 30 SEP 2009') Group By mi. UNIQ_MBR_ID, pd. PRVDR_SPCLTY_DESC, FCP. LAST_SRVC_DT, JJ. BRAND_NAME,
    DD GNRC_NAME, JJ. AHFS_THRPTC_CLS_CD, JJ. AHFS_THRPTC_CLS_DESC, JJ. LABEL_NAME, JJ. STRNGTH_NUM,
    DD STRNGTH_UNIT_DESC, JJ. SPECF_THRPTC_CLS_CD, JJ. SPECF_THRPTC_CLS_DESC, JJ. GCN_NUM, FCP. PRSCRPTN_NUM.
    NOTE: PROC SQL set NOEXEC option and will continue to check the syntax of the instructions.
    180 run (drop table biplr_up_v1) in rosdwp;
    NOTE: Statement is not executed because the NOEXEC option.
    181 disconnect of rosdwp;
    NOTE: Statement is not executed because the NOEXEC option.
    182 of quitting;
    NOTE: The SAS system is stopped at this stage of processing errors.
    NOTE: PROCEDURE used SQL (total duration of processes):
    time real 0.14 seconds
    time CPU 0.03 seconds

    183
    184

    (1) assuming that LAST_SRVC_DT is a column of PHRMCY_CLM_FACT, to precede the table alias "FCP" rather than the full table name. If a table alias is specified in the FROM clause, it should be used rather than the full table name when you reference the columns.
    2) there are two tables in the WHERE clause that do not appear in the FROM clause:

    PHRMCY_FINL_CLM_DMNSN
    MBR_BNFT_DMNSN

    user12142482 wrote:
    Hello again,

    Wish Oracle was a bit more informative. Uses an Institute of SAS product called Enterprise Guide. A "hot fix" has been installed to solve a problem that the product appears unable to save the latest version of the revised code changes (hence "BETWEEN between" remaining even after an earlier edition). In any case, with the change, now get this error:

    «ERROR: ORACLE prepare error: ORA-00904: "PHRMCY_CLM_FACT".» ' LAST_SRVC_DT': invalid identifier. (The log file is displayed below)

    -The-Les restes remains of the error, no matter if code "pass" is used to move the date range to Oracle (which seems correct to the log output below that I believe), or if I hard code the date range in the query SQL PL itself.

    -L' preparation error always appears at the end of the internal SELECTION.
    -L' error of preparation remain, with or without the GROUP BY clause.

    Is there something else I'm missing? Someone suggested a reserve word - but other versions of the ANSI SQL standard, I don't see that is the case. I went to Support SAS and SAS list serve to the University of Georgia, but nothing definite from these sources. Have requested either able to run Oracle directly, outside this SAS Institute product - process.

    Any suggestions are greatly appreciated. Thank you to all the world very much.

    Jeff
    150 OF
    151 PHRMCY_CLM_FACT pcf,


    152 MBR_ID_DMNSN environment,
    153 DRUG_DMNSN dd,
    154 PRVDR_DMNSN pd,
    155 BIPLR_UP_V1 BLPR2
    156. WHERE THE
    157 (BIPLR_UP_V1.mbr_id = MBR_ID_DMNSN. UNIQ_MBR_ID) and
    158 (PHRMCY_CLM_FACT. FINL_CLM_KEY = PHRMCY_FINL_CLM_DMNSN. FINL_CLM_KEY) AND
    159 (PHRMCY_CLM_FACT. MBR_KEY = MBR_ID_DMNSN. MBR_KEY) and
    160 (PHRMCY_CLM_FACT. BNFT_KEY = MBR_BNFT_DMNSN. BNFT_KEY) and
    161 (PHRMCY_CLM_FACT. DRUG_KEY = DRUG_DMNSN. DRUG_KEY) and
    162 (PHRMCY_FINL_CLM_DMNSN. CLM_ORGN_CD IN (', 'A')) AND
    163 (PHRMCY_CLM_FACT. BETWEEN LAST_SRVC_DT & q. & fdos. & q and q & ldos. & q)
    (164);
    ERROR: ORACLE prepare error: ORA-00904: "PHRMCY_CLM_FACT." "' LAST_SRVC_DT ': invalid identifier. SQL statement:

  • Using DBMS_METADATA. GET_DDL get error: ORA-00907: lack the right parenthesis

    Hello

    I try to extract the schema DDL to a base (10.2.0.4.0 - 64-bit Enterprise Edition on Solaris 10). I ran the query below and get an ORA-00907: parenthesis right absent error.

    SELECT DBMS_METADATA. GET_DDL (REPLACE(object_type,' ','_') AS object_type, object_name) FROM user_objects WHERE object_type NOT IN ('TABLE_PARTITION', "INDEX_PARTITION", "LOB");

    This is the output when executing the above in the sqlplus worksheet

    Select DBMS_METADATA. GET_DDL (REPLACE (object_type, ", '_') as object_type, object_name) FROM user_objects if object_type in ('TABLE_PARTITION',"INDEX_PARTITION","LOB")
    *
    ERROR on line 1:
    ORA-00907: lack of right parenthesis

    remove the where the clause gives the following:

    Select DBMS_METADATA. GET_DDL (REPLACE (object_type, ", '_') as object_type, object_name) FROM user_objects
    *
    ERROR on line 1:
    ORA-00907: lack of right parenthesis

    Pointers would be welcome. I know I could get the DDL using exp/imp, but I'd like to understand why I get the error of missing parenthesis.

    see you soon,

    Ewan

    SELECT DBMS_METADATA. GET_DDL (REPLACE(object_type,' ','_') AS object_type, object_name) FROM user_objects WHERE object_type NOT IN

    You don't need an alias here. Getting rid of the "as long as object_type' and it should work.

  • ORA-00928: lack of keyword SELECT when you create a trigger

    Hello

    I am trying to create a trigger that is simple for the purpose of verification as below:
    CREATE OR REPLACE TRIGGER customer_audit
    before insert or update or delete on CUSTOMER for each row
    BEGIN
       if :old.cname is null and :new.cname is not null or :old.cname is not null and :new.cname is null  or :old.cname != :new.cname  THEN
          INSERT INTO audit_table (:old.cname,  :new.cname, null, 'cname');
          COMMIT;
       ENDIF;
    end;
    This compiles with warning. When I check the warning, he said:
    TRIGGER customer_audit compiled
    Warning: execution completed with warning
    3/32           PL/SQL: ORA-00928: missing SELECT keyword
    3/7            PL/SQL: SQL Statement ignored
    Do not know how to SELECT is part of what I'm trying to do here, or miss me something of totally. Help, please. Thank you very much.

    Change ENDIF; in END IF; and try again...

  • error: ora-00907 lack the right parenthesis

    Hello


    I don't know where I am doing wrong, please help me


    update of tmp_data_mins p

    SET p.DISPLAY_VOLUME = ((select display_volume from tmp_data_mins

    where RULE_APPLIED =' rule 2: three consecutive time intervals are

    missing with the period ') q

    where (to_char (p.DAYASDATE,'DD/MM/YYYY HH24')) =

    (to_char (q.DAYASDATE,'DD/MM/YYYY HH24'))

    AND p.HOURASNUMBER = q.HOURSNUMBER);


    Thanks in advance

    Your syntax is disabled, you try to make a mixture of subquery and join that is not valid.  It should be something more like:

    update of tmp_data_mins p

    SET p.DISPLAY_VOLUME = (select display_volume

    of tmp_data_mins q

    where q.RULE_APPLIED =' rule 2: three consecutive time intervals are missing the period ' and

    trunc (p.DAYASDATE, 'hh24') = trunc (q.DAYASDATE, 'hh24')

    AND p.HOURASNUMBER = q.HOURSNUMBER)

    where exists (select display_volume

    of tmp_data_mins q

    where q.RULE_APPLIED =' rule 2: three consecutive time intervals are missing the period ' and

    trunc (p.DAYASDATE, 'hh24') = trunc (q.DAYASDATE, 'hh24')

    AND p.HOURASNUMBER = q.HOURSNUMBER);

    I'm not ethat you really need the trunc applied to dates, but it is equivalent to your expression to_char, and it is generally much safer to compare dates in dates rather than convert a date to a string and compare those.

    Also note that, as wrote your query and mine updates all rows in the parameter tmp_data_mins display_volume table to null for rows that do not match the subquery.  You would (probably) need to add another predicate in the outer query the identifu only the lines that you want to update, and there are predicate using the same query in the clause set would be a likely candidate.

    That said, I don't understand what you're trying to accomplish with this update because you're updating at the same table you are querying of.  As said by Frank, a few examples of data and an explanation of what you're trying to accomplish would be useful.

    John

    After seeing just this thread https://community.oracle.com/thread/3560425 I think I understand what you're trying to do and changed the query above (I think) do the update that you want, and it seems that you have the trunc applied to dates.

    Post edited by: John Spencer

  • SQL error: ORA-00936: lack of expression

    Hi all

    Sorry I can't speak English very well

    I would like to know what is the problem on my code
    CREATE TABLE MOB (MOBILE VARCHAR2(20));
    Insert into EXPORT_TABLE (MOBILE) values ('0124873214');
    Insert into EXPORT_TABLE (MOBILE) values ('0184873214');
    Insert into EXPORT_TABLE (MOBILE) values ('0174873214');
    Insert into EXPORT_TABLE (MOBILE) values ('0120141115');
    Insert into EXPORT_TABLE (MOBILE) values ('0104873214');
    Insert into EXPORT_TABLE (MOBILE) values ('0164873214');
    Insert into EXPORT_TABLE (MOBILE) values ('0194873214');
    Insert into EXPORT_TABLE (MOBILE) values ('0114873214');
    Insert into EXPORT_TABLE (MOBILE) values ('0144873214');
    Insert into EXPORT_TABLE (MOBILE) values ('0122257278');
    My select statement works fine but I have problem with update
    SELECT CASE (SUBSTR(MOBILE,1,3))
           WHEN '012' THEN '0122'||SUBSTR(MOBILE,4,10) 
           WHEN '018' THEN '0128'||SUBSTR(MOBILE,4,10)
           WHEN '017' THEN '0127'||SUBSTR(MOBILE,4,10)
           WHEN '010' THEN '0100'||SUBSTR(MOBILE,4,10)
           WHEN '016' THEN '0106'||SUBSTR(MOBILE,4,10)
           WHEN '019' THEN '0109'||SUBSTR(MOBILE,4,10)
           WHEN '011' THEN '0111'||SUBSTR(MOBILE,4,10)
           WHEN '014' THEN '0114'||SUBSTR(MOBILE,4,10)
           END "NEW MOB"
    FROM   MOB
    
    RESULT
    
    NEW MOB      
    --------------
    01224873214    
    01284873214    
    01274873214    
    01220141115    
    01004873214    
    01064873214    
    01094873214    
    01114873214    
    01144873214    
    01222257278    
    
     10 rows selected 
    I have a problem with the update
    UPDATE MOB 
    SET    MOBILE = ANY( CASE (SUBSTR(MOBILE,1,3))
           WHEN '012' THEN '0122'||SUBSTR(MOBILE,4,10) 
           WHEN '018' THEN '0128'||SUBSTR(MOBILE,4,10)
           WHEN '017' THEN '0127'||SUBSTR(MOBILE,4,10)
           WHEN '010' THEN '0100'||SUBSTR(MOBILE,4,10)
           WHEN '016' THEN '0106'||SUBSTR(MOBILE,4,10)
           WHEN '019' THEN '0109'||SUBSTR(MOBILE,4,10)
           WHEN '011' THEN '0111'||SUBSTR(MOBILE,4,10)
           WHEN '014' THEN '0114'||SUBSTR(MOBILE,4,10)
           END "NEW MOB";
           --FROM   MOB);
    COMMIT;
    I thank all

    What exactly is the problem?

    UPDATE MOB
    SET    MOBILE = CASE SUBSTR(MOBILE,1,3)
           WHEN '012' THEN '0122'||SUBSTR(MOBILE,4,10)
           WHEN '018' THEN '0128'||SUBSTR(MOBILE,4,10)
           WHEN '017' THEN '0127'||SUBSTR(MOBILE,4,10)
           WHEN '010' THEN '0100'||SUBSTR(MOBILE,4,10)
           WHEN '016' THEN '0106'||SUBSTR(MOBILE,4,10)
           WHEN '019' THEN '0109'||SUBSTR(MOBILE,4,10)
           WHEN '011' THEN '0111'||SUBSTR(MOBILE,4,10)
           WHEN '014' THEN '0114'||SUBSTR(MOBILE,4,10)
           ELSE MOBILE
           END;
    
  • CASE in a WHERE clause: ORA-00905

    Hello world
    I try to use a BOX in a WHERE clause clause and I got the error ORA-00905: lack of keyword. Here is my code:

    SELECT id_reserv,
    Concat (name, Concat ('_', index)) as name,
    Libelle,
    num_lot,
    resa_keyword1,
    resa_keyword2,
    resa_keyword3,
    resa_keyword4,
    date_creation,
    comm_creation,
    id_util,
    assets,
    id_env_act,
    (SELECT connection of user u where u.id_util = r.id_util) AS nom_util,
    (SELECT name e environment where e.id_env = r.id_env_act) AS nom_env,
    (SELECT count (*) of rc reserv_comp where rc.id_reserv = r.id_reserv) AS nbComp,
    (SELECT count (*) MC reserv_modif where mc.id_reserv = r.id_reserv) AS nbModif
    BOOKING r
    WHERE the r.nom NOT LIKE 'RESERV_LOT_ % '.
    AND id_util = '1'
    AND active = '1'
    AND id_env_act > = '-1'.
    AND the MATTER sansdemande
    WHEN true THEN id_reserv not in some id_reserv from demande_livraison where id_env_dep > = '-1'.
    ELSE id_reserv = id_reserv
    END
    AND name LIKE '% '.
    ORDER BY date_creation;

    I already looked at the CASE statement and it seems that the syntax is correct, so I don't know I can use in a WHERE clause.
    Any help would be nice!

    Andalusians

    Hello

    It should be something like this:

    AND CASE
      WHEN 'false'='true' THEN (select id_reserv from demande_livraison where id_env_dep>='-1')
      ELSE id_reserv
         END = id_reserv 
    

    The subquery must return a line

    But I think that it is better to write your query in the form:

    SELECT id_reserv,
         concat(nom,concat('_',indice)) as nom,
         libelle,
         num_lot,
         resa_keyword1,
         resa_keyword2,
         resa_keyword3,
         resa_keyword4,
         date_creation,
         comm_creation,
         id_util,
         actif,
         id_env_act,
         (SELECT login from utilisateur u where u.id_util=r.id_util) AS nom_util,
         (SELECT nom from environnement e where e.id_env=r.id_env_act) AS nom_env,
         (SELECT count(*) from reserv_comp rc where rc.id_reserv=r.id_reserv) AS nbComp,
         (SELECT count(*) from reserv_modif mc where mc.id_reserv=r.id_reserv) AS nbModif
    FROM reservation r
         WHERE r.nom NOT LIKE 'RESERV_LOT_%'
         AND id_util='1'
         AND actif='1'
         AND id_env_act>='-1'
         AND
                       (
                          (  'false'='true' and id_reserv not in (select id_reserv from demande_livraison where id_env_dep>='-1')
                          )
                          or
                          ( 'true'= 'true' and id_reserv=id_reserv
                          )
                       )
         AND nom LIKE '%'
    ORDER BY date_creation;
    

    This coding in SQL something as if a = b, then c, d also in the simplest form.

    Herald tiomela
    http://htendam.WordPress.com

  • ORA-00936: lack of Interface STEP expression for update flag lines

    Hello world!

    We have an interface that retrieves data of essbase and the load into a table target Oracle.

    We use the Modules (KM) following Knowledge:

    LKM Hyperion Essbase DATA SQL

    IKM SQL incremental update

    When we run the interface, at the stage of 'flag to update lines', we get the following error

    Stage: 'make update'

    Error: ORA-00936: lack of expression

    This is definition message tab:

    ODI-1228: Exportar Presupuesto General (integration) task fails on ORACLE ODI_STAGE connection target.

    Caused by: java.sql.SQLSyntaxErrorException: ORA-00936: lack of expression

    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:462)

    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:405)

    at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:931)

    at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:481)

    at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:205)

    at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:548)

    at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:217)

    at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:1115)

    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1488)

    at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3769)

    at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3954)

    at oracle.jdbc.driver.OraclePreparedStatementWrapper.execute(OraclePreparedStatementWrapper.java:1539)

    at oracle.odi.runtime.agent.execution.sql.SQLCommand.execute(SQLCommand.java:163)

    at oracle.odi.runtime.agent.execution.sql.SQLExecutor.execute(SQLExecutor.java:102)

    at oracle.odi.runtime.agent.execution.sql.SQLExecutor.execute(SQLExecutor.java:1)

    at oracle.odi.runtime.agent.execution.TaskExecutionHandler.handleTask(TaskExecutionHandler.java:50)

    at com.sunopsis.dwg.dbobj.SnpSessTaskSql.processTask(SnpSessTaskSql.java:2913)

    at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java:2625)

    at com.sunopsis.dwg.dbobj.SnpSessStep.treatAttachedTasks(SnpSessStep.java:577)

    at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java:468)

    at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:2128)

    to oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$ 2.doAction(StartSessRequestProcessor.java:366)

    at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:216)

    at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.doProcessStartSessTask(StartSessRequestProcessor.java:300)

    to oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.access$ 0 (StartSessRequestProcessor.java:292)

    to oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$ StartSessTask.doExecute (StartSessRequestProcessor.java:855)

    at oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:126)

    to oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor$ 2.run(DefaultAgentTaskExecutor.java:82)

    at java.lang.Thread.run(Thread.java:662)

    This is CODE tab:


    Update HYP_INT. I _TRG_PRESUPUESTO_ESS_GENERAL $

    Set IND_UPDATE = 'U '.

    When there is)

    Select 'X '.

    of HYP_INT. TRG_PRESUPUESTO_ESS_GENERAL T

    where

    )

    We do not know why query created the interface has some missing statements when the sql is created. Do you think that a lack or settings or just something worng or a bug?

    The ODI client version is ODI_11.1.1.7.0_GENERIC_130128.1205


    You give us any suggestions to fix this?

    Any suggestions would be very helpful!


    Thank you


    Ivan Lemus

    Since you're using IKM of SQL incremental update, you must mark a logical key on the fields of your target.

    This key allows the comparison for insert and update.

  • ORA-00905 in Create Table

    Hello

    I create 2 APEX table with foreign key; the first table is OK, but in the second table, I get an error "ora-00905 keyword missing."

    This is the statement:

    "

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

    -Table "PATRIMONIO." 'SCHEDA_ANAGRAFICA '.

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

    CREATE TABLE SCHEDA_ANAGRAFICA (

      ID_SCHEDA VARCHAR (20) NOT NULL ,

      MUNICIPIO VARCHAR (45) NULL ,

      ADDRESS VARCHAR (45) NULL ,

    DIP_CONSEGANTARIO VARCHAR()45() NULL

      DETAILS VARCHAR (45) NULL ,

      TIPOLOGIA VARCHAR (45) NULL ,

    DESCR_IMMOBILE VARCHAR()90) NULL

      PRIMARY KEY (ID_SCHEDA) );

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

    -Table "PATRIMONIO." 'SCHEDA_AMMINISTRATIVA '.

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

    CREATE TABLE SCHEDA_AMMINISTRATIVA (

      ID_SCHEDA VARCHAR (20) NOT NULL ,

    DESCR_TRASFERIMENTO VARCHAR()45() NOT NULL

    NOTA_TRASCRIZIONE VARCHAR()45() NULL

      ASSEGNAZIONE VARCHAR (45) NULL ,

      VERB_CONSEGNA VARCHAR (45) NULL ,

      CONCESSIONE VARCHAR (45) NULL ,

      NOTE                VARCHAR (45) NULL ,

    PRIMARY KEY ( )ID_SCHEDA DESCR_TRASFERIMENTO)

    Fk_AMMINISTRATIVA_ANAGRAFICA of the CONSTRAINT

        FOREIGN KEY (ID_SCHEDA)

    REFERENCES SCHEDA_ANAGRAFICA ()ID_SCHEDA( )

    WE REMOVE ANY ACTION

        ON UPDATE NO ACTION );

    "

    I don't understand the cause.

    Can you help me?

    Thank you

    5fd006d0-5573-4a0f-821a-63f2bd8083fd wrote:

    Please update your forum profile with a real handle instead of '5fd006d0-5573-4a0f-821a-63f2bd8083fd '.

    I create 2 APEX table with foreign key; the first table is OK, but in the second table, I get an error "ora-00905 keyword missing."

    You create tables in the Oracle RDBMS, not by their SUMMIT. APEX is a development tool, not a database.

    This is the statement:

    "

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

    -Table "PATRIMONIO." 'SCHEDA_ANAGRAFICA '.

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

    CREATE TABLE SCHEDA_ANAGRAFICA)

    ID_SCHEDA VARCHAR (20) NOT NULL,

    NULL IN MUNICIPIO OF VARCHAR (45).

    ADDRESS VARCHAR (45) NULL,

    DIP_CONSEGANTARIO VARCHAR (45) NULL,

    DETAILS VARCHAR (45) NULL,

    TIPOLOGIA VARCHAR (45) NULL,

    DESCR_IMMOBILE VARCHAR (90) NULL,

    PRIMARY KEY (ID_SCHEDA));

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

    -Table "PATRIMONIO." 'SCHEDA_AMMINISTRATIVA '.

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

    CREATE TABLE SCHEDA_AMMINISTRATIVA)

    ID_SCHEDA VARCHAR (20) NOT NULL,

    DESCR_TRASFERIMENTO VARCHAR (45) NOT NULL,

    NOTA_TRASCRIZIONE VARCHAR (45) NULL,

    ASSEGNAZIONE VARCHAR (45) NULL,

    VERB_CONSEGNA VARCHAR (45) NULL,

    CONCESSIONE VARCHAR (45) NULL,

    NOTE VARCHAR (45) NULL,

    PRIMARY KEY (ID_SCHEDA, DESCR_TRASFERIMENTO).

    CONSTRAINT fk_AMMINISTRATIVA_ANAGRAFICA

    FOREIGN KEY (ID_SCHEDA)

    REFERENCES SCHEDA_ANAGRAFICA (ID_SCHEDA)

    ON DELETE NO ACTION

    UPDATE NO ACTION);

    "

    I don't understand the cause.

    Ni NO ACTION or ON UPDATE are valid in a REFERENCES clause in Oracle. If you want to default to make referential integrity checks can remove these clauses. The only other options are ON DELETE CASCADE/SET NULL.

  • WITH ACE translated by ORA-00928: lack of SELECT keyword


    Hi all

    We run on Oracle 10 g. The following script is translated by ORA-00928: lack of keyword SELECT. Any ideas what causes this error? Two statements by operating by themselves, complete with success "select".

    [code]

    WITH A1 AS

    WITH A1 (SELECT MIN (VAPS_RPT_INTV_DMSN. INTV_DT), VAPS_RPT_INTV_DMSN. RPT_ID, VAPS_RPT_INTV_DMSN. RPT_INTV_ID OF THE APS. VAPS_RPT_INTV_DMSN, APS. VAPS_RPT_CL_INTV_DMSN WHERE APS. VAPS_RPT_INTV_DMSN. RPT_INTV_ID = APS. VAPS_RPT_CL_INTV_DMSN. RPT_CL_INTV_ID AND VAPS_RPT_INTV_DMSN. HM_VST_IND = '1' GROUP OF VAPS_RPT_INTV_DMSN. RPT_ID, VAPS_RPT_INTV_DMSN. RPT_INTV_ID ORDER BY VAPS_RPT_INTV_DMSN. RPT_ID, VAPS_RPT_INTV_DMSN. RPT_INTV_ID) A2 AS (SELECT DISTINCT TAPS_REFERRALS_FACT. RPT_ID, TAPS_REFERRALS_FACT. DB2_UPDATE_DT, TAPS_REFERRALS_FACT. RPT_RECV_DT OF THE APS. TAPS_REFERRALS_FACT, APS. VAPS_RPT_CL_DMSN, APS. VAPS_RPT_CL_INTV_DMSN WHERE VAPS_RPT_CL_DMSN. RPT_ID = TAPS_REFERRALS_FACT. RPT_ID AND VAPS_RPT_CL_INTV_DMSN. RPT_CL_ID = VAPS_RPT_CL_DMSN. RPT_CL_ID AND TAPS_REFERRALS_FACT. EMRG_IND = '1') SELECT * FROM A1, A2 WHERE A1. RPT_INTV_ID = A2. RPT_INTV_ID

    [/ code]

    Thank you

    Seyed

    Right, A2 is not column named RPT_INTV_ID.

    SY.

Maybe you are looking for