Impdp triggers always give error ORA-04071:missing BEFORE, AFTER or INSTEAD

Hello,
I am using 11g impdp to create a test system.
I use this cmd to import
impdp 'SYS/xxxxx@PWRFUN AS SYSDBA' dumpfile=PWRPROD.DMP logfile=PWRFUNimportPROD.log SCHEMAS=pwrplant TABLE_EXISTS_ACTION=REPLACE
Then I get this error for all the triggers
ORA-39083: Object type TRIGGER failed to create with error:
ORA-04071: missing BEFORE, AFTER or INSTEAD OF keyword
Failing sql is:
CREATE TRIGGER "PWRPLANT"."APPROVAL_STEPS_HISTORY" PS_HISTORY
BEFORE UPDATE OR INSERT ON PWRPLANT.APPROVAL_STEPS_HISTORY
FOR EACH ROW
BEGIN    :new.user_id := USER;    :new.time_stamp := SYSDATE; END;
As you can see, the trigger does contain the word "before".
When I remove " "PWRPLANT"."APPROVAL_STEPS_HISTORY" " and run the trigger below, it compiles correctly. Why is this, and how do I make my impdp to run correctly?
CREATE TRIGGER PS_HISTORY
BEFORE UPDATE OR INSERT ON PWRPLANT.APPROVAL_STEPS_HISTORY
FOR EACH ROW
BEGIN    :new.user_id := USER;    :new.time_stamp := SYSDATE; END;

same error, thanks for your attemp
Error starting at line 1 in command:
CREATE TRIGGER "PWRPLANT"."APPROVAL_STEPS_HISTORY" PS_HISTORY
BEFORE UPDATE OR INSERT ON PWRPLANT.APPROVAL_STEPS_HISTORY
REFERENCING new AS new
FOR EACH ROW
BEGIN :new.user_id := USER; :new.time_stamp := SYSDATE; END;
Error report:
ORA-04071: missing BEFORE, AFTER or INSTEAD OF keyword
04071. 00000 - "missing BEFORE, AFTER or INSTEAD OF keyword"
*Cause:    The trigger statement is missing the BEFORE/AFTER/INSTEAD OF clause.
*Action:   Specify either BEFORE, AFTER or INSTEAD OF.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

Similar Messages

  • Schema generate error ORA-04071

    I�m trying to generate a schema into SCM using jr_registration.generate(schema_name=>�NAME�);. Every time it fails with this error:
    ORA-04071: missing BEFORE, AFTER or INSTEAD OF keyword
    ORA-06512: at "REPOS_MANAGER.JR_GEN", line 4329
    ORA-06512: at "REPOS_MANAGER.JR_REGISTRATION", line 148
    ORA-06512: at line 2
    After reviewing the log it�s happening on the first schema trigger it�s trying to generate. The syntax for the trigger create is incorrect.
    create or replace trigger A_TRIGGER TRIGGER_COLUMN" AFTER
    UPDATE OF "TRIGGER_COLUMN" ON "NAME"."i$A_TABLE" FOR EACH ROW begin if not jr_context.constraints_enabled then return; end if; ��
    There is a � missing before the name of the trigger and it also seems to be adding the triggering column to trigger name.
    This error occurred in SCM 9.0.2.4. I installed the patch to 9.0.2.6 expecting it would be corrected, but it�s still happening.
    Any ideas?
    Thanks,
    Alan Glasmire

    This looks like a bug... Can you open a tar with support and provide the original and modified XML Schemas...
    Do you have the option of dropping and re-creating the user at this point ?

  • ERROR: ORACLE prepare error: ORA-00936: missing expression

    Hello,
    I am required to run "pass-through" Oracle SQL, to extract data from tables into SAS for processing and manipulation. My code (attached) reads and writes (executes) but with zero records to test first. I cannot get past the Prepare Error.
    The query is very much like other queries that seem to work, but I cannot get past this prepare error. I have no other access to individauls with adequate knowledge of PL SQL, and as a last stop hoped others in the forum could quickly spot the source of errror.
    Thanks very much in advance for any assistance.
    Jeff
    1 ;*';*";*/;quit;run;
    2 OPTIONS PAGENO=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 _ALL_ CLOSE;
    NOTE: Some of your options or statements may not be supported with the Activex or Java series of devices. Graph defaults for these
    drivers may be different from other SAS/GRAPH device drivers. For further information, please contact Technical Support.
    9 OPTIONS DEV=ACTIVEX;
    10 FILENAME EGHTML TEMP;
    NOTE: Writing HTML(EGHTML) Body 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=("CODEBASE"="http://www2.sas.com/codebase/graph/v91/sasgraph.exe") NOGTITLE NOGFOOTNOTE GPATH=&sasworklocation
    11 ! ;
    12
    13 %gaccessible;
    14 /********************************************************/
    15 * RX_BIPLR_V3.SAS ;
    16 /********************************************************/
    17
    18 dm 'log;clear;out;clear';
    19 options linesize =120;
    20 Option obs=0 NoReplace;
    21
    22 ****************************************************************************************;
    23 *Date Programmer Reviewed By WHAT WAS DONE;
    24 *----- -------------- ------------ -----------------------------------------;
    25 *2005 David Boyd Program creation for test population;
    26 *;
    27 *02/06/2006 Ivon Jones Modified to include total population;
    28 *;
    29 *07/20/2006 Ivon Jones Identified data elements for exclusion;
    30 * or inclusion for consolidation with ;
    31 * Robin's report;
    32 *;
    33 *08/18/2006 Ivon Jones Updated the Specific Therapeutic Classes;
    34 * 10-2009 J Shaf - modified to extract actual or potential Bipolar Dx from UBH and Medical Claims;
    35 ****************************************************************************************;
    36
    37
    38
    39 *%let allclmorgn = ('M','A') ; /* all claims origin code */
    40 %let begdate='01SEP2009'd;
    41 %let enddate='30SEP2009'd;
    42 %let q = %str(%') ;
    43
    44
    45 data _null_ ;
    46 call symput('fdos',put(intnx('month',"&begdate"d,-27,'beginning'), date9.) ) ;
    47 call symput('ldos',put(intnx('month',"&enddate"d,-0,'ending'), date9.) ) ;
    48 run ;
    NOTE: DATA statement used (Total process time):
    real time 0.00 seconds
    2 The SAS System 11:44 Friday, October 30, 2009
    cpu time 0.01 seconds
    49
    50
    51
    52 **************************************************************;
    53 * ??Use the data _null_ step to create a macro variable for the ;
    54 * year and month based on the ldos macro variable in the data ;
    55 * step above?? ;
    56 **************************************************************;
    57
    58
    59 data _null_ ;
    60 if month("&ldos"d) < 10
    61 then call symput('yr_mo',compress(year("&ldos"d) || '0' || month("&ldos"d) ) ) ;
    62 else call symput('yr_mo',compress(year("&ldos"d) || month("&ldos"d) ) ) ;
    63 run ;
    NOTE: Numeric values have been converted to character values at the places given by: (Line):(Column).
    61:39 61:64 62:39 62:57
    NOTE: DATA statement used (Total process time):
    real time 0.00 seconds
    cpu time 0.00 seconds
    64
    65 *%put &biplr_dx;
    66 %put &begdate ;
    '01SEP2009'd
    67 %put &enddate ;
    '30SEP2009'd
    68 %put &fdos ;
    01JUN2007
    69 %put &ldos ;
    30SEP2009
    70 %put &q ;
    71
    72
    73 libname biplr'/home/jshafi01/projects/adhoc/biplr_dprsn/data';
    NOTE: Libref BIPLR was successfully assigned as follows:
    Engine: V9
    Physical Name: /home/jshafi01/projects/adhoc/biplr_dprsn/data
    74 libname rosdwp oracle user="&oracle_user." pass="&oracle_pass." buffsize=32767 path='rosdwp';
    NOTE: Libref ROSDWP was successfully assigned as follows:
    Engine: ORACLE
    Physical Name: rosdwp
    75
    76 data work.biplr_up_v1;
    77 attrib mbr_id length=$26;
    78 set biplr.biplr_ubh_med_v1;
    79 run;
    NOTE: There were 0 observations read from the data set BIPLR.BIPLR_UBH_MED_V1.
    NOTE: The data set WORK.BIPLR_UP_V1 has 0 observations and 1 variables.
    NOTE: DATA statement used (Total process time):
    real time 0.01 seconds
    3 The SAS System 11:44 Friday, October 30, 2009
    cpu time 0.00 seconds
    80
    81 proc contents;
    82 run;
    NOTE: PROCEDURE CONTENTS used (Total process time):
    real time 0.03 seconds
    cpu time 0.03 seconds
    83
    84 proc datasets
    85      library = rosdwp nolist;
    86      delete biplr_up_v1;
    87 quit;
    NOTE: Deleting ROSDWP.BIPLR_UP_V1 (memtype=DATA).
    NOTE: PROCEDURE DATASETS used (Total process time):
    real time 3.74 seconds
    cpu time 0.03 seconds
    88
    89 proc datasets
    90      library=work nolist;
    91      copy out = rosdwp move;
    92      select biplr_up_v1 ;
    93 quit;
    NOTE: Moving WORK.BIPLR_UP_V1 to ROSDWP.BIPLR_UP_V1 (memtype=DATA).
    NOTE: SAS variable labels, formats, and lengths are not written to DBMS tables.
    NOTE: There were 0 observations read from the data set WORK.BIPLR_UP_V1.
    NOTE: The data set ROSDWP.BIPLR_UP_V1 has 0 observations and 1 variables.
    NOTE: PROCEDURE DATASETS used (Total process time):
    real time 0.32 seconds
    cpu time 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);
    105      execute(alter session set nls_date_format = 'ddmonyyyy') by rosdwp;
    106 CREATE table biplr_rx as
    107 SELECT
    108 mrb_id,
    109 pcp_spc,
    110 rx_date,
    4 The SAS System 11:44 Friday, October 30, 2009
    111 brand,
    112 generic,
    113 ahfs_cd,
    114 ahfs_dsc,
    115 lbl,
    116 strngth,
    117 unt,
    118 spc_tx_cls_cd,
    119 spc_tx_cls_dsc,
    120 gcn,
    121 rx_num,
    122 rx_ingrd,
    123 rx_paid,
    124 rx_cnt,
    125 rx_qty,
    126 rx_day
    127 FROM connection to rosdwp
    128 (SELECT
    129 mid.UNIQ_MBR_ID as mrb_id,
    130 pd.PRVDR_SPCLTY_DESC as pcp_spc,
    131 pcf.LAST_SRVC_DT as rx_date,
    132 dd.BRAND_NAME as brand,
    133 dd.GNRC_NAME as generic,
    134 dd.AHFS_THRPTC_CLS_CD as ahfs_cd,
    135 dd.AHFS_THRPTC_CLS_DESC as ahfs_dsc,
    136 dd.LABEL_NAME as lbl,
    137 dd.STRNGTH_NUM as strngth,
    138 dd.STRNGTH_UNIT_DESC as unt,
    139 dd.SPECF_THRPTC_CLS_CD as spc_tx_cls_cd,
    140 dd.SPECF_THRPTC_CLS_DESC as spc_tx_cls_dsc,
    141 dd.GCN_NUM as gcn,
    142 pcf.PRSCRPTN_NUM as rx_num,
    143 SUM(pcf.INGRDNT_AMT) as rx_ingrd,
    144 SUM(pcf.PD_AMT) as rx_paid,
    145 SUM(pcf.UNIT_SRVC_CNT) as rx_cnt,
    146 SUM(pcf.DSPNSD_QTY) as rx_qty,
    147 SUM(pcf.DAY_SUPLY_CNT) as rx_day
    148 FROM
    149 PHRMCY_CLM_FACT pcf,
    150 MBR_ID_DMNSN mid,
    151 DRUG_DMNSN dd,
    152 PRVDR_DMNSN pd,
    153           biplr_up_v1
    154 WHERE
    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 ('M','A')) AND
    162 (PHRMCY_CLM_FACT.LAST_SRVC_DT BETWEEN between &q.&fdos.&q and &q.&ldos.&q)
    163      )
    164 Group By
    165 mid.UNIQ_MBR_ID ,
    166 pd.PRVDR_SPCLTY_DESC ,
    167 pcf.LAST_SRVC_DT ,
    168 dd.BRAND_NAME ,
    5 The SAS System 11:44 Friday, October 30, 2009
    169 dd.GNRC_NAME ,
    170 dd.AHFS_THRPTC_CLS_CD ,
    171 dd.AHFS_THRPTC_CLS_DESC ,
    172 dd.LABEL_NAME ,
    173 dd.STRNGTH_NUM ,
    174 dd.STRNGTH_UNIT_DESC ,
    175 dd.SPECF_THRPTC_CLS_CD ,
    176 dd.SPECF_THRPTC_CLS_DESC ,
    177 dd.GCN_NUM ,
    178 pcf.PRSCRPTN_NUM
    179 );
    ERROR: ORACLE prepare error: ORA-00936: missing expression. SQL statement: SELECT mid.UNIQ_MBR_ID as mrb_id,
    pd.PRVDR_SPCLTY_DESC as pcp_spc, pcf.LAST_SRVC_DT as rx_date, dd.BRAND_NAME as brand, dd.GNRC_NAME as generic,
    dd.AHFS_THRPTC_CLS_CD as ahfs_cd, dd.AHFS_THRPTC_CLS_DESC as ahfs_dsc, dd.LABEL_NAME as lbl, dd.STRNGTH_NUM as
    strngth, dd.STRNGTH_UNIT_DESC as unt, dd.SPECF_THRPTC_CLS_CD as spc_tx_cls_cd, dd.SPECF_THRPTC_CLS_DESC as
    spc_tx_cls_dsc, dd.GCN_NUM as gcn, pcf.PRSCRPTN_NUM as rx_num, SUM(pcf.INGRDNT_AMT) as rx_ingrd, SUM(pcf.PD_AMT)
    as rx_paid, SUM(pcf.UNIT_SRVC_CNT) as rx_cnt, SUM(pcf.DSPNSD_QTY) as rx_qty, SUM(pcf.DAY_SUPLY_CNT) as rx_day
    FROM PHRMCY_CLM_FACT pcf, MBR_ID_DMNSN mid, DRUG_DMNSN dd, PRVDR_DMNSN pd, biplr_up_v1 WHERE (
    (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 ('M','A')) AND (PHRMCY_CLM_FACT.LAST_SRVC_DT BETWEEN between '01JUN2007'
    and '30SEP2009') ) Group By mid.UNIQ_MBR_ID , pd.PRVDR_SPCLTY_DESC , pcf.LAST_SRVC_DT , dd.BRAND_NAME ,
    dd.GNRC_NAME , dd.AHFS_THRPTC_CLS_CD , dd.AHFS_THRPTC_CLS_DESC , dd.LABEL_NAME , dd.STRNGTH_NUM ,
    dd.STRNGTH_UNIT_DESC , dd.SPECF_THRPTC_CLS_CD , dd.SPECF_THRPTC_CLS_DESC , dd.GCN_NUM , pcf.PRSCRPTN_NUM.
    NOTE: PROC SQL set option NOEXEC and will continue to check the syntax of statements.
    180 execute (drop table biplr_up_v1) by rosdwp;
    NOTE: Statement not executed due to NOEXEC option.
    181 disconnect from rosdwp;
    NOTE: Statement not executed due to NOEXEC option.
    182 quit;
    NOTE: The SAS System stopped processing this step because of errors.
    NOTE: PROCEDURE SQL used (Total process time):
    real time 0.14 seconds
    cpu time 0.03 seconds
    183
    184

    Hello Again ,
    Wish Oracle was a bit more informative. Am using a SAS Institute Product called Enterprise Guide. A "hot fix" was installed to address an issue that the product appears unable to save the latest version of edited code changes (hence " BETWEEN between" remaining even after a prior edit). In any case, with the change, am now receiving this error:
    " ERROR: ORACLE prepare error: ORA-00904: "PHRMCY_CLM_FACT"."LAST_SRVC_DT": invalid identifier". (Log file appears below)
    -The error remains, regardless of whether one uses "pass through" code to pass the date range to Oracle (which looks ok from the log output below I believe), or if I hard code the date range into the PL SQL query itself.
    -The Prepare error always appears at end of the inner SELECT.
    -The Prepare error remains, with or without the GROUP BY clause.
    Is there anything else here I am missing? Someone suggested a reserve word - but from other ANSI SQL versions, I do not see that is the case. I have consulted SAS Tech Support and SAS List Serve at University of GA. but nothing definitive from these sources. Have requested facility to be able to run Oracle directly, outside this SAS Institute product - in process.
    Any suggestions are greatly appreciated. Thanks to everyone very much.
    Jeff
    14 /********************************************************/
    15 * RX_BIPLR_V3.SAS ;
    16 /********************************************************/
    17
    18 dm 'log;clear;out;clear';
    19 options linesize =120;
    20 Option obs=0 NoReplace;
    21
    22 ****************************************************************************************;
    23 *Date       Programmer         Reviewed By     WHAT WAS DONE;
    24 *-----      --------------     ------------    -----------------------------------------;
    25 *2005 D. Boyd Program creation for test population;
    26 *;
    27 *02/06/2006 I. Jones Modified to include total population;
    28 *;
    29 *07/20/2006 I. Jones Identified data elements for exclusion;
    30 * or inclusion for consolidation with ;
    31 * Robin's report;
    32 *;
    33 *08/18/2006 I Jones Updated the Specific Therapeutic Classes;
    34 * 10-2009 J Shaf - modified to extract actual or potential Bipolar Dx from UBH and Medical Claims;
    35 ****************************************************************************************;
    36
    37
    38
    39 *%let allclmorgn = ('M','A') ; /* all claims origin code */
    40 %let begdate='01SEP2009'd;
    41 %let enddate='30SEP2009'd;
    42 %let q = %str(%') ;
    43
    44
    45 data null ;
    46 call symput('fdos',put(intnx('month',"&begdate"d,-27,'beginning'), date9.) ) ;
    47 call symput('ldos',put(intnx('month',"&enddate"d,-0,'ending'), date9.) ) ;
    48 run ;
    2 The SAS System 12:46 Monday, November 2, 2009
    NOTE: DATA statement used (Total process time):
    real time 0.00 seconds
    cpu time 0.00 seconds
    49
    50
    51
    52 **************************************************************;
    53 * ??Use the data null step to create a macro variable for the ;
    54 * year and month based on the ldos macro variable in the data ;
    55 * step above?? ;
    56 **************************************************************;
    57
    58
    59 data null ;
    60 if month("&ldos"d) < 10
    61 then call symput('yr_mo',compress(year("&ldos"d) || '0' || month("&ldos"d) ) ) ;
    62 else call symput('yr_mo',compress(year("&ldos"d) || month("&ldos"d) ) ) ;
    63 run ;
    NOTE: Numeric values have been converted to character values at the places given by: (Line):(Column).
    61:39 61:64 62:39 62:57
    NOTE: DATA statement used (Total process time):
    real time 0.00 seconds
    cpu time 0.01 seconds
    64
    65 *%put &biplr_dx;
    66 %put &begdate ;
    '01SEP2009'd
    67 %put &enddate ;
    '30SEP2009'd
    68 %put &fdos ;
    01JUN2007
    69 %put &ldos ;
    30SEP2009
    70 %put &q ;
    71
    72
    73 libname biplr'/home/jshafi01/projects/adhoc/biplr_dprsn/data';
    NOTE: Libref BIPLR was successfully assigned as follows:
    Engine: V9
    Physical Name: /home/jshafi01/projects/adhoc/biplr_dprsn/data
    74 libname rosdwp oracle user="&oracle_user." pass="&oracle_pass." buffsize=32767 path='rosdwp';
    NOTE: Libref ROSDWP was successfully assigned as follows:
    Engine: ORACLE
    Physical Name: rosdwp
    75
    76 data work.biplr_up_v1;
    77 attrib mbr_id length=$26;
    78 set biplr.biplr_ubh_med_v1;
    79 run;
    NOTE: There were 0 observations read from the data set BIPLR.BIPLR_UBH_MED_V1.
    NOTE: The data set WORK.BIPLR_UP_V1 has 0 observations and 1 variables.
    NOTE: DATA statement used (Total process time):
    real time 0.00 seconds
    cpu time 0.01 seconds
    80
    81 proc contents;
    82 run;
    NOTE: PROCEDURE CONTENTS used (Total process time):
    real time 0.02 seconds
    cpu time 0.02 seconds
    83
    84 proc datasets
    85      library = rosdwp nolist;
    86      delete biplr_up_v1;
    87 quit;
    NOTE: Deleting ROSDWP.BIPLR_UP_V1 (memtype=DATA).
    NOTE: PROCEDURE DATASETS used (Total process time):
    real time 0.61 seconds
    cpu time 0.01 seconds
    88
    89 proc datasets
    90      library=work nolist;
    91      copy out = rosdwp move;
    92      select biplr_up_v1 ;
    93 quit;
    NOTE: Moving WORK.BIPLR_UP_V1 to ROSDWP.BIPLR_UP_V1 (memtype=DATA).
    NOTE: SAS variable labels, formats, and lengths are not written to DBMS tables.
    NOTE: There were 0 observations read from the data set WORK.BIPLR_UP_V1.
    NOTE: The data set ROSDWP.BIPLR_UP_V1 has 0 observations and 1 variables.
    NOTE: PROCEDURE DATASETS used (Total process time):
    real time 0.15 seconds
    cpu time 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);
    105      execute(alter session set nls_date_format = 'ddmonyyyy') by rosdwp;
    106 CREATE table biplr_rx as
    107 SELECT
    108 mrb_id,
    109 uniq_mbr_id,
    110 pcp_spc,
    111 rx_date,
    112 brand,
    113 generic,
    114 ahfs_cd,
    115 ahfs_dsc,
    116 lbl,
    117 strngth,
    118 unt,
    119 spc_tx_cls_cd,
    120 spc_tx_cls_dsc,
    121 gcn,
    122 rx_num,
    123 rx_ingrd,
    124 rx_paid,
    125 rx_cnt,
    126 rx_qty,
    127 rx_day
    128 FROM connection to rosdwp
    129 (SELECT
    130 mid.UNIQ_MBR_ID as uniq_mrb_id,
    131 blpr.mrb_id.mbr_id,
    132 pd.PRVDR_SPCLTY_DESC as pcp_spc,
    133 pcf.LAST_SRVC_DT as rx_date,
    134 dd.BRAND_NAME as brand,
    135 dd.GNRC_NAME as generic,
    136 dd.AHFS_THRPTC_CLS_CD as ahfs_cd,
    137 dd.AHFS_THRPTC_CLS_DESC as ahfs_dsc,
    138 dd.LABEL_NAME as lbl,
    139 dd.STRNGTH_NUM as strngth,
    140 dd.STRNGTH_UNIT_DESC as unt,
    141 dd.SPECF_THRPTC_CLS_CD as spc_tx_cls_cd,
    142 dd.SPECF_THRPTC_CLS_DESC as spc_tx_cls_dsc,
    143 dd.GCN_NUM as gcn,
    144 pcf.PRSCRPTN_NUM as rx_num,
    145 SUM(pcf.INGRDNT_AMT) as rx_ingrd,
    146 SUM(pcf.PD_AMT) as rx_paid,
    147 SUM(pcf.UNIT_SRVC_CNT) as rx_cnt,
    148 SUM(pcf.DSPNSD_QTY) as rx_qty,
    149 SUM(pcf.DAY_SUPLY_CNT) as rx_day
    150 FROM
    151 PHRMCY_CLM_FACT pcf,
    152 MBR_ID_DMNSN mid,
    153 DRUG_DMNSN dd,
    154 PRVDR_DMNSN pd,
    155      BIPLR_UP_V1 blpr
    156 WHERE
    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 ('M','A')) AND
    163 (PHRMCY_CLM_FACT.LAST_SRVC_DT BETWEEN &q.&fdos.&q and &q.&ldos.&q)
    164 );
    ERROR: ORACLE prepare error: ORA-00904: "PHRMCY_CLM_FACT"."LAST_SRVC_DT": invalid identifier. SQL statement: SELECT
    mid.UNIQ_MBR_ID as uniq_mrb_id, blpr.mrb_id.mbr_id, pd.PRVDR_SPCLTY_DESC as pcp_spc, pcf.LAST_SRVC_DT as
    rx_date, dd.BRAND_NAME as brand, dd.GNRC_NAME as generic, dd.AHFS_THRPTC_CLS_CD as ahfs_cd,
    dd.AHFS_THRPTC_CLS_DESC as ahfs_dsc, dd.LABEL_NAME as lbl, dd.STRNGTH_NUM as strngth, dd.STRNGTH_UNIT_DESC as
    unt, dd.SPECF_THRPTC_CLS_CD as spc_tx_cls_cd, dd.SPECF_THRPTC_CLS_DESC as spc_tx_cls_dsc, dd.GCN_NUM as gcn,
    pcf.PRSCRPTN_NUM as rx_num, SUM(pcf.INGRDNT_AMT) as rx_ingrd, SUM(pcf.PD_AMT) as rx_paid, SUM(pcf.UNIT_SRVC_CNT)
    as rx_cnt, SUM(pcf.DSPNSD_QTY) as rx_qty, SUM(pcf.DAY_SUPLY_CNT) as rx_day FROM PHRMCY_CLM_FACT pcf,
    MBR_ID_DMNSN mid, DRUG_DMNSN dd, PRVDR_DMNSN pd, BIPLR_UP_V1 blpr WHERE (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 ('M','A')) AND
    (PHRMCY_CLM_FACT.LAST_SRVC_DT BETWEEN '01JUN2007' and '30SEP2009').
    NOTE: PROC SQL set option NOEXEC and will continue to check the syntax of statements.
    165 execute (drop table biplr_up_v1) by rosdwp;
    NOTE: Statement not executed due to NOEXEC option.
    166 disconnect from rosdwp;
    NOTE: Statement not executed due to NOEXEC option.
    167 quit;
    NOTE: The SAS System stopped processing this step because of errors.
    NOTE: PROCEDURE SQL used (Total process time):
    real time 0.24 seconds
    cpu time 0.02 seconds
    168
    Edited by: user12142482 on Nov 2, 2009 4:02 PM

  • Dynamic table in Oracle report data model using laxical parameter is giving error Ora-00936: missing expression

    Hi ,
    I am using Oracle report 10G
    And trying to create report with dynamic table
    SELECT &COL1, &COL2
    FROM &TAB
    If I put this on data model it gives below error
    ORA-00936: missing expression
    ==> from
    Can anybody advise to solve this issue.
    Regards,
    Brajesh

    Look in the Reports Builder Help:
    If you want to use lexical references in your SELECT clause, you should create a separate lexical reference for each column you will substitute. In addition, you should assign an alias to each lexical reference.
    Does adding the column alias solve the problem?

  • IR Report Search - ORA-20001: get_dbms_sql_cursor error ORA-00936: missing expression

    Hi All,
      I had created a IR report based on a table and it was working with no issues.  But after few days, when I try searching using the IR search bar it shows "ORA-20001: get_dbms_sql_cursor error ORA-00936: missing expression" error message. I don't see any debug messages or errors in the debug window. The Finder drop down is empty too, there are no columns displayed to filter.
    When I recreate the IR report(new page) based on the same table, It works fine and there are no issues with the search.  But the old IR report search doesnt work. I have not modified the any thing in the old report after initial creation. Report uses Primary key based on a sequence.
    What might have caused this issue?
    Is there a way to intercept the search query from IR report?
    Apex version - 4.2.3.00.08.
    Any help on this appreciated.
    Thanks,
    Jagan

    Hi MK, as I had mentioned in my post, I don't see any logs in the debug window, query tab.
    Can you please guide me how to check the query logs on search?
    Thanks,
    Jagan

  • One of out DB while starting gives error ORA-03113

    One of out DB while starting gives error ORA-03113. Need some inputs to resolve this issue.
    SQL> startup
    ORACLE instance started.
    Total System Global Area  603979776 bytes
    Fixed Size                  1250380 bytes
    Variable Size             163580852 bytes
    Database Buffers          432013312 bytes
    Redo Buffers                7135232 bytes
    Database mounted.
    ORA-03113: end-of-file on communication channelRegards,
    Lokanath

    Please find the dts.
    Mon Jan 09 16:12:41 2012
    starting up 1 dispatcher(s) for network address '(ADDRESS=(PARTIAL=YES)(PROTOCOL=TCP))'...
    starting up 1 shared server(s) ...
    Mon Jan 09 16:12:41 2012
    alter database mount exclusive
    Mon Jan 09 16:12:48 2012
    Setting recovery target incarnation to 2
    Mon Jan 09 16:12:49 2012
    Successful mount of redo thread 1, with mount id 3125175737
    Mon Jan 09 16:12:49 2012
    Database mounted in Exclusive Mode
    Completed: alter database mount exclusive
    Mon Jan 09 16:12:49 2012
    alter database open
    Mon Jan 09 16:12:51 2012
    Rolling back half complete log switch of thread 1
    Mon Jan 09 16:12:52 2012
    Errors in file d:\oracle\product\10.2.0\admin\ecuprog\bdump\ecuprog_lgwr_5024.trc:
    ORA-00202: control file: 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\ECUPROG\CONTROL01.CTL'
    ORA-27091: unable to queue I/O
    ORA-27069: attempt to do I/O beyond the range of the file
    OSD-04026: Invalid parameter passed. (OS 432)
    Mon Jan 09 16:12:56 2012
    Errors in file d:\oracle\product\10.2.0\admin\ecuprog\bdump\ecuprog_lgwr_5024.trc:
    ORA-00204: error in reading (block 432, # blocks 1) of control file
    ORA-00202: control file: 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\ECUPROG\CONTROL01.CTL'
    ORA-27091: unable to queue I/O
    ORA-27069: attempt to do I/O beyond the range of the file
    OSD-04026: Invalid parameter passed. (OS 432)
    LGWR: terminating instance due to error 204
    Mon Jan 09 16:12:58 2012
    Errors in file d:\oracle\product\10.2.0\admin\ecuprog\bdump\ecuprog_dbw0_5264.trc:
    ORA-00204: error in reading (block , # blocks ) of control file
    Mon Jan 09 16:13:00 2012
    Errors in file d:\oracle\product\10.2.0\admin\ecuprog\bdump\ecuprog_pmon_3784.trc:
    ORA-00204: error in reading (block , # blocks ) of control file
    Mon Jan 09 16:13:01 2012
    Errors in file d:\oracle\product\10.2.0\admin\ecuprog\bdump\ecuprog_psp0_4388.trc:
    ORA-00204: error in reading (block , # blocks ) of control file
    Mon Jan 09 16:13:01 2012
    Errors in file d:\oracle\product\10.2.0\admin\ecuprog\bdump\ecuprog_mman_4828.trc:
    ORA-00204: error in reading (block , # blocks ) of control file
    Mon Jan 09 16:13:01 2012
    Errors in file d:\oracle\product\10.2.0\admin\ecuprog\bdump\ecuprog_ckpt_2604.trc:
    ORA-00204: error in reading (block , # blocks ) of control file
    Mon Jan 09 16:13:01 2012
    Errors in file d:\oracle\product\10.2.0\admin\ecuprog\bdump\ecuprog_reco_4492.trc:
    ORA-00204: error in reading (block , # blocks ) of control file
    Mon Jan 09 16:13:02 2012
    Errors in file d:\oracle\product\10.2.0\admin\ecuprog\bdump\ecuprog_smon_4484.trc:
    ORA-00204: error in reading (block , # blocks ) of control file
    Mon Jan 09 16:13:03 2012
    Instance terminated by LGWR, pid = 5024
    Mon Jan 09 16:15:01 2012
    WARNING: inbound connection timed out (ORA-3136)
    Mon Jan 09 16:29:35 2012
    WARNING: inbound connection timed out (ORA-3136)
    Mon Jan 09 16:55:01 2012
    WARNING: inbound connection timed out (ORA-3136)
    Mon Jan 09 17:06:50 2012
    WARNING: inbound connection timed out (ORA-3136)
    Mon Jan 09 17:07:52 2012
    Starting ORACLE instance (normal)
    LICENSE_MAX_SESSION = 0
    LICENSE_SESSIONS_WARNING = 0
    Picked latch-free SCN scheme 2
    Using LOG_ARCHIVE_DEST_10 parameter default value as USE_DB_RECOVERY_FILE_DEST
    Autotune of undo retention is turned on.
    IMODE=BR
    ILAT =18
    LICENSE_MAX_USERS = 0
    SYS auditing is disabled
    ksdpec: called for event 13740 prior to event group initialization
    Starting up ORACLE RDBMS Version: 10.2.0.1.0.
    System parameters with non-default values:
      processes                = 150
      __shared_pool_size       = 155189248
      __large_pool_size        = 4194304
      __java_pool_size         = 4194304
      __streams_pool_size      = 0
      sga_target               = 603979776
      control_files            = D:\ORACLE\PRODUCT\10.2.0\ORADATA\ECUPROG\CONTROL01.CTL, D:\ORACLE\PRODUCT\10.2.0\ORADATA\ECUPROG\CONTROL02.CTL, D:\ORACLE\PRODUCT\10.2.0\ORADATA\ECUPROG\CONTROL03.CTL
      db_block_size            = 8192
      __db_cache_size          = 432013312
      compatible               = 10.2.0.1.0
      db_file_multiblock_read_count= 16
      db_recovery_file_dest    = D:\oracle\product\10.2.0/flash_recovery_area
      db_recovery_file_dest_size= 2147483648
      undo_management          = AUTO
      undo_tablespace          = UNDOTBS1
      remote_login_passwordfile= EXCLUSIVE
      db_domain                =
      dispatchers              = (PROTOCOL=TCP) (SERVICE=ecuprogXDB)
      job_queue_processes      = 10
      audit_file_dest          = D:\ORACLE\PRODUCT\10.2.0\ADMIN\ECUPROG\ADUMP
      background_dump_dest     = D:\ORACLE\PRODUCT\10.2.0\ADMIN\ECUPROG\BDUMP
      user_dump_dest           = D:\ORACLE\PRODUCT\10.2.0\ADMIN\ECUPROG\UDUMP
      core_dump_dest           = D:\ORACLE\PRODUCT\10.2.0\ADMIN\ECUPROG\CDUMP
      db_name                  = ecuprog
      open_cursors             = 300
      pga_aggregate_target     = 201326592
    PMON started with pid=2, OS id=4832
    PSP0 started with pid=3, OS id=4208
    MMAN started with pid=4, OS id=3216
    DBW0 started with pid=5, OS id=4020
    LGWR started with pid=6, OS id=4728
    CKPT started with pid=7, OS id=4860
    SMON started with pid=8, OS id=2932
    RECO started with pid=9, OS id=3772
    CJQ0 started with pid=10, OS id=5244
    MMON started with pid=11, OS id=4568
    MMNL started with pid=12, OS id=5828
    Mon Jan 09 17:07:53 2012
    starting up 1 dispatcher(s) for network address '(ADDRESS=(PARTIAL=YES)(PROTOCOL=TCP))'...
    starting up 1 shared server(s) ...
    Mon Jan 09 17:07:53 2012
    ALTER DATABASE   MOUNT
    Mon Jan 09 17:07:58 2012
    Setting recovery target incarnation to 2
    Mon Jan 09 17:07:59 2012
    Successful mount of redo thread 1, with mount id 3125157033
    Mon Jan 09 17:07:59 2012
    Database mounted in Exclusive Mode
    Completed: ALTER DATABASE   MOUNT
    Mon Jan 09 17:07:59 2012
    ALTER DATABASE OPEN
    Mon Jan 09 17:08:01 2012
    Rolling back half complete log switch of thread 1
    Mon Jan 09 17:08:02 2012
    Errors in file d:\oracle\product\10.2.0\admin\ecuprog\bdump\ecuprog_lgwr_4728.trc:
    ORA-00202: control file: 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\ECUPROG\CONTROL01.CTL'
    ORA-27091: unable to queue I/O
    ORA-27069: attempt to do I/O beyond the range of the file
    OSD-04026: Invalid parameter passed. (OS 432)
    Mon Jan 09 17:08:05 2012
    Errors in file d:\oracle\product\10.2.0\admin\ecuprog\bdump\ecuprog_lgwr_4728.trc:
    ORA-00204: error in reading (block 432, # blocks 1) of control file
    ORA-00202: control file: 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\ECUPROG\CONTROL01.CTL'
    ORA-27091: unable to queue I/O
    ORA-27069: attempt to do I/O beyond the range of the file
    OSD-04026: Invalid parameter passed. (OS 432)
    LGWR: terminating instance due to error 204
    Mon Jan 09 17:08:06 2012
    Errors in file d:\oracle\product\10.2.0\admin\ecuprog\bdump\ecuprog_dbw0_4020.trc:
    ORA-00204: error in reading (block , # blocks ) of control file
    Mon Jan 09 17:08:07 2012
    Errors in file d:\oracle\product\10.2.0\admin\ecuprog\bdump\ecuprog_pmon_4832.trc:
    ORA-00204: error in reading (block , # blocks ) of control file
    Mon Jan 09 17:08:07 2012
    Errors in file d:\oracle\product\10.2.0\admin\ecuprog\bdump\ecuprog_reco_3772.trc:
    ORA-00204: error in reading (block , # blocks ) of control file
    Mon Jan 09 17:08:07 2012
    Errors in file d:\oracle\product\10.2.0\admin\ecuprog\bdump\ecuprog_smon_2932.trc:
    ORA-00204: error in reading (block , # blocks ) of control file
    Mon Jan 09 17:08:07 2012
    Errors in file d:\oracle\product\10.2.0\admin\ecuprog\bdump\ecuprog_ckpt_4860.trc:
    ORA-00204: error in reading (block , # blocks ) of control file
    Mon Jan 09 17:08:09 2012
    Errors in file d:\oracle\product\10.2.0\admin\ecuprog\bdump\ecuprog_psp0_4208.trc:
    ORA-00204: error in reading (block , # blocks ) of control file
    Mon Jan 09 17:08:09 2012
    Errors in file d:\oracle\product\10.2.0\admin\ecuprog\bdump\ecuprog_mman_3216.trc:
    ORA-00204: error in reading (block , # blocks ) of control file
    Instance terminated by LGWR, pid = 4728

  • I´m getting these error ORA-00936:missing expression runnig a Task on Info

    I´m getting these error ORA-00936: missing expression, when running the SDE_ORA_Reverse_GLJournals task.
    I´m setting the variables $$FILTER_BY_LEDGER_ID, $$FILTER_BY_LEDGER_TYPE, $$LEDGER_ID_LIST and $$LEDGER_TYPE_LIST in the DAC correctly. I see the values asigned to those variables in the parameters file( SDE_ORA_Reverse_GLJournals.txt)
    But when the task is executing, those values comes empty. Does someone have encountered with the same mistake?
    Thanks in advanced.

    Hi,
    Im finding a similar issue but with task SDE_ORA_GLJournals,
    the code is :
    AND DECODE(, 'Y', GL.LEDGER_ID, 1) IN ()
    AND DECODE(, 'Y', GL.LEDGER_CATEGORY_CODE, 'NONE') IN ()]
    the parameters are also fine in the parameters file.
    Has anyone found a solution or an explanation for this?
    Thanks a lot, regards
    Nestor

  • Migrating from Sql server get SQL Error: ORA-00936: missing expression

    All,
    I'm migrating from Sql Server to oracle 10g and I'm getting a
    "SQL Error: ORA-00936: missing expression" error
    when the following create table statement is executed. It appears 10g does not like the CREATE DEFAULT xxxx as xxx syntax. Any ideas??
    CREATE TABLE EnvCapitalOtherCostAtom (
    EnvID CHAR(36) NOT NULL,
    CapitalID CHAR(36) NOT NULL,
    Seq FLOAT DEFAULT
    CREATE DEFAULT D_Set_To_Zero
         AS 0
    NOT NULL,
    AtomID CHAR(36) DEFAULT
    CREATE DEFAULT D_NewGUID
         AS newid
    NOT NULL,
    AtomName VARCHAR2(100) NOT NULL,
    AtomName_dqa NUMBER(5,0) DEFAULT
    CREATE DEFAULT D_DQA_Dflt
         AS 10
    NOT NULL,
    CreatedOnTimeStamp TIMESTAMP(6) NOT NULL,
    LastEditedOnTimeStamp TIMESTAMP(6) NOT NULL,
    TFDubh_dqa NUMBER(5,0),
    record_flags NUMBER(5,0) DEFAULT
    CREATE DEFAULT D_Record_Flags
         AS 0
    NOT NULL,
    record_dqa NUMBER(5,0) DEFAULT
    CREATE DEFAULT D_Record_DQA
         AS 30
    NOT NULL
    );

    Hi Chris,
    not sure SQL Server accepts the syntax you provided either. Even more I have checked MSDN(http://msdn2.microsoft.com/en-us/library/ms173565.aspx) and they recommend:
    Avoid using CREATE DEFAULT in new development work, and plan to modify applications that currently use it. Instead, use default definitions created using the DEFAULT keyword of ALTER TABLE or CREATE TABLE. CREATE DEFAULT will be removed in a future version of Microsoft SQL Server.
    In Oracle you should do the same either use DEFAULT in CREATE TABLE statement or in ALTER TABLE, have a look at http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14251/adfns_constraints.htm#sthref626 for more details.
    The proper Oracle syntax for your DDL should be something like:
    CREATE TABLE EnvCapitalOtherCostAtom (
    EnvID CHAR(36) NOT NULL,
    CapitalID CHAR(36) NOT NULL,
    Seq FLOAT DEFAULT 0 NOT NULL,
    AtomID CHAR(36) DEFAULT SYS_GUID() NOT NULL,
    AtomName VARCHAR2(100) NOT NULL,
    AtomName_dqa NUMBER(5,0) DEFAULT 10 NOT NULL,
    CreatedOnTimeStamp TIMESTAMP(6) NOT NULL,
    LastEditedOnTimeStamp TIMESTAMP(6) NOT NULL,
    TFDubh_dqa NUMBER(5,0),
    record_flags NUMBER(5,0) DEFAULT 0 NOT NULL,
    record_dqa NUMBER(5,0) DEFAULT 30 NOT NULL
    );

  • The following javascript error(s) occured: missing before statement

    dear sir
    would u help solve my problem, please???
    i can not operate my dreamweaver, because when i operate it always appears the statement as follow;
    the following javascript error(s) occured:
    set FSO
    missing before statement
    i have used your suggestions to delete file cache in my configuration folder but still not works and also recreate the folder but it's still not work
    please help????
    tx

    --- Pada Ming, 16/1/11, SnakEyez02 <[email protected]> menulis:
    Dari: SnakEyez02 <[email protected]>
    Judul: the following javascript error(s) occured: missing before statement
    Kepada: "bayhaki halmahera" <[email protected]>
    Tanggal: Minggu, 16 Januari, 2011, 12:42 AM
    Visit the following KB article for the complete details on all steps.  Deleting the preferences/configuration is only one possible step.
    http://kb2.adobe.com/cps/405/kb405604.html

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

    Hi,
    I'm trying to extract schema DDL from a database (10.2.0.4.0 - 64bit Enterprise Edition on Solaris 10). I run the query below and get an ORA-00907: missing right parenthesis 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 running the above in sqlplus worksheet
    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')
    ERROR at line 1:
    ORA-00907: missing right parenthesis
    removing the where clause gives the following:
    select DBMS_METADATA.GET_DDL( REPLACE(object_type,' ','_') as object_type, object_name) FROM user_objects
    ERROR at line 1:
    ORA-00907: missing right parenthesis
    Any pointers would be gratefully received. I know I could get the DDL out using exp/imp but I want to understand why I'm getting the missing parenthesis error.
    cheers,
    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. Get rid of " AS object_type" and it should work.

  • FOR UPDATE on scrollable cursor and error: ORA-00907: missing right parenthesis

    If change my query to have a FOR UPDATE and make it an updatable scrollable cursor I get an error on the updateRow() command saying "ORA-00907: missing right parenthesis"
    If I remove the FOR UPDATE it works OK.
    The problem I have is trying to update a CLOB from a ResultSet. If I do not upate any other column I get the error saying that the error"
    "ORA-22920: row containing the LOB value is not locked"
    I can get around this by adding FOR UPDATE. But if I add FOR UPDATE and try to update any non-CLOB column I get the 00907 error above.
    Hmmmm. So here is what I can and cannot do:
    - I CAN update the CLOB IF I update another column 1st and NO FOR UPDATE clause.
    - I CAN update the CLOB only if I have FOR UPDATE clause.
    - I CANNOT update just the CLOB without FOR UPDATE.
    - I CANNOT update any non-CLOB column with FOR UPDATE.
    What a pain in the ***! How am I to provide generic access to the applications being built on my DB layer. This is crazy!

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Andrew Edgar ([email protected]):
    I have this same problem!
    The error occurs when performing updateRow.
    The turning off of auto commit only gets the query to work but not the actual update.
    Will this be fixed in the next version of the Driver?<HR></BLOCKQUOTE>
    Here is the stack Trace I recieved:
    java.sql.SQLException: ORA-00907: missing right parenthesis
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168)
    at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:208)
    at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:543)
    at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1405)
    at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:822)
    at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:1446)
    at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1371)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1900)
    at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:363)
    at oracle.jdbc.driver.UpdatableResultSet.execute_updateRow(UpdatableResultSet.java:2135)
    at oracle.jdbc.driver.UpdatableResultSet.updateRow(UpdatableResultSet.java:1322)

  • Automatic Row Processing fetch error (ORA-00936: missing expres) - synonyms

    I have built an Apex application in Apex v4.0.0.00.46. I have built an Apex input form on a table that is in the same Oracle schema where Apex application resides. Now I am trying to migrate that table to a different Oracle schema but I am having this problem after I created the table on the new schema and created a SYNONYM to point to the new location of the table.
    ORA-06550: line 1, column 17: PL/SQL: ORA-00936: missing expression ORA-06550: line 1, column 9: PL/SQL: SQL Statement ignored
    I can select on this table via SQL Plus using the synonym. The form uses a "Automated Row Fetch" process action and fails in this step when trying to fetch data for the form. I don't get the error if I set the condition property to "never" but the fetch does not run; as soon as disable the condition I get this error.
    Apex query report regions work fine using the synonyms but the problem seems to occur only on the automated row fetch accion.
    I appreciate if someone can help out with this problem. Thanks.

    Hi,
    Follow the steps:
    1. Go to application
    2. Click on "Edit Application Properties" Button.
    3. Select the Parsing Schema to new schema in Name Region.
    4. Click "Apply Changes" Button.
    Regards,
    Kartik Patel
    http://patelkartik.blogspot.com/
    http://apex.oracle.com/pls/apex/f?p=9904351712:1

  • Automatic Row Processing fetch error (ORA-00936: missing expression)

    Hi there,
    I have a bit of a problem setting up automatic row processing. The Apex processing is causing an error, but I'm not sure what PL/SQL code is being run (obviously, I don't have access to the Apex code) and all I get is the error following:
    0.13: Processing point: AFTER_HEADER
    0.13: ...Process "Notes load": DML_FETCH_ROW (AFTER_HEADER) F|#OWNER#:PUPIL_NOTE:P29_PUPIL_ID:PUPIL_ID:P29_ACHIEVEMENT_SET_ID:ACHIEVEMENT_SET_ID
    0.16: Show ERROR page...
    and then the following exception report on the page:
    ORA-06550: line 1, column 17: PL/SQL: ORA-00936: missing expression ORA-06550: line 1, column 9: PL/SQL: SQL Statement ignored
    Can anyone tell me how I can diagnose the problem?
    Many thanks,
    Robert
    Message was edited to change subject

    I am having a very similiar problem
    0.02: Fetch session state from database
    0.03: Branch point: BEFORE_HEADER
    0.03: Fetch application meta data
    0.03: Computation point: BEFORE_HEADER
    0.03: Processing point: BEFORE_HEADER
    0.04: ...DML_FETCH_ROW (BEFORE_HEADER) F|#OWNER#:JOH:P66_JOH_ID:JOH_ID
    0.49: Show ERROR page...
    0.50: Processing point: AFTER_ERROR_HEADER
    ORA-06550: line 1, column 17: PL/SQL: ORA-00936: missing expression ORA-06550: line 1, column 9: PL/SQL: SQL Statement ignored
    JOH was a synonym (allowing other shemas to access the table) but @I delted those
    P66_JOH_ID is a DB column (which it wasnt)
    but I still get the error
    ORA-06550: line 1, column 17: PL/SQL: ORA-00936: missing expression ORA-06550: line 1, column 9: PL/SQL: SQL Statement ignored
    Any ideas how I can track this down?

  • Error: ORA-00905:Missing keyword while creating Materialized view

    Hi Gurus,
    I am trying to create a materialized view as :
    1 CREATE MATERIALIZED VIEW AMREG.ClientData
    2 TABLESPACE AMREG_DATA
    3 COMPRESS
    4 PARALLEL
    5 NOLOGGING
    6 BUILD IMMEDIATE
    7 REFRESH COMPLETE
    8 ON DEMAND
    9 DISABLE QUERY REWRITE
    10 REFRESH START WITH TRUNC( SYSDATE + 1 ) + 3/24 NEXT TRUNC( SYSDATE + 1 ) + 3/24
    11 AS
    12 SELECT
    13 CHILD.CLIENT_SGK "Child SGK",
    14 CHILD.CLIENT_NAME "Child Name",
    15 CHILD.ARC_ACCT_CD "Child ARC Acct Code",
    16 ULTIMATE.CLIENT_SGK "Ultimate Parent SGK",
    17 ULTIMATE.CLIENT_NAME "Ultimate Parent Name",
    18 ULTIMATE.ARC_ACCT_CD "Ultimate ARC Acct Code",
    19 HIER.LVL_FROM_ANCESTOR ,
    20 FROM [email protected] CHILD,
    21 [email protected] HIER,
    22 [email protected] ULTIMATE
    23 WHERE HIER.DESCENDANT_CLIENT_SGK = CHILD.CLIENT_SGK
    24* AND ULTIMATE.CLIENT_SGK = HIER.ANCESTOR_CLIENT_SGK;
    SQL> /
    REFRESH START WITH TRUNC( SYSDATE + 1 ) + 3/24 NEXT TRUNC( SYSDATE + 1 ) + 3/24
    ERROR at line 10:
    ORA-00905: missing keyword
    DBLink name is : DNYCPH60.WORLD
    Please guide me on this and help to resolve the issue.

    I provided the answer over at the duplicate post ...
    ORA-00905: missing keyword error while creating a materialised view
    Please, please, please ... please do not duplicate posts. Pick one. If you don't get an answer in a reasonable time - close it (edit the title) and THEN open in a different forum.

  • Error ORA-00928: missing SELECT keyword

    Dear All,
    I have created package and also create function in it return me error..
    ORA-00928: missing SELECT keyword..
    Package Specification
    CREATE OR REPLACE PACKAGE PERSONLIZATION_NEW AS
    FUNCTION PO_ITEM_BRANCH (ITEM_ID NUMBER, BRANCH_CODE VARCHAR2)
    RETURN NUMBER;
    END PERSONLIZATION_NEW;
    Package body.
    CREATE OR REPLACE PACKAGE BODY PERSONLIZATION_NEW AS
    ITEM_ID NUMBER;
    BRANCH_CODE NUMBER;
    FUNCTION PO_ITEM_BRANCH (ITEM_ID NUMBER, BRANCH_CODE VARCHAR2)
    RETURN NUMBER IS RESULT NUMBER;
    FUNCTION PO_ITEM_BRANCH (ITEM_ID NUMBER, BRANCH_CODE VARCHAR2)
    RETURN NUMBER IS
    RESULT NUMBER;
    BEGIN
    SELECT
    count(a.asset_number) into result
    FROM
    SELECT
    c.CATEGORY_ID,
    a.ASSET_NUMBER
    FROM
    FA_ADDITIONS A
    ,FA_CATEGORIES_VL C
    ,FA_BOOKS B
    ,FA_LOCATIONS FL
    ,FA_DISTRIBUTION_HISTORY DH
    ,FA_TRANSACTION_HEADERS TH
    WHERE
    A.ASSET_CATEGORY_ID=C.CATEGORY_ID
    AND A.ASSET_ID=B.ASSET_ID
    AND A.ASSET_ID=TH.ASSET_ID
    AND TH.TRANSACTION_TYPE_CODE='ADDITION'
    AND B.TRANSACTION_HEADER_ID_IN=TH.TRANSACTION_HEADER_ID
    AND B.ASSET_ID=TH.ASSET_ID
    AND A.ASSET_ID=DH.ASSET_ID
    AND DH.LOCATION_ID=FL.LOCATION_ID
    AND TH.TRANSACTION_TYPE_CODE='ADDITION'
    --AND  FL.SEGMENT4 = 'Shalimar Campus Lahore'
    AND TH.TRANSACTION_TYPE_CODE <> 'FULL RETIREMENT'
    -- AND FL.SEGMENT4 = (SELECT flex_value FROM fnd_flex_values WHERE ATTRIBUTE1 = '04010303')
    AND A.ASSET_CATEGORY_ID IN (
    SELECT
    msi.asset_category_id
    FROM
    po_requisition_lines_all b,
    mtl_system_items_b msi
    WHERE
    b.ITEM_ID = msi.INVENTORY_ITEM_ID
    AND msi.inventory_item_id(+) = B.item_id
    AND msi.organization_id(+) = B.destination_organization_id
    AND b.item_id = ITEM_ID
    AND FL.SEGMENT4 = (
    SELECT
    (SELECT FLEX_VALUE FROM fnd_flex_values WHERE ATTRIBUTE1 = B.ATTRIBUTE2) BRANCH
    FROM
    po_requisition_lines_all b,
    mtl_system_items_b msi
    WHERE
    b.ITEM_ID = msi.INVENTORY_ITEM_ID
    AND msi.inventory_item_id(+) = B.item_id
    AND msi.organization_id(+) = B.destination_organization_id
    AND b.ATTRIBUTE2 = BRANCH_CODE
    ) A
    RETURN(RESULT);
    END;
    --END PERSONLIZATION_NEW;                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    Hi,
    user10941925 wrote:
    Dear All,
    I have created package and also create function in it return me error..
    ORA-00928: missing SELECT keyword..Whenever you have a problem concerning an error message, post the complete error message, including line numbers.
    Make sure it's clear what causes the error. In this case, is it compiling the package spec, compiling the package body, or calling the function?
    Package Specification
    CREATE OR REPLACE PACKAGE PERSONLIZATION_NEW AS
    FUNCTION PO_ITEM_BRANCH (ITEM_ID NUMBER, BRANCH_CODE VARCHAR2)
    RETURN NUMBER;
    END PERSONLIZATION_NEW;Please format your code to make it readable.
    Whenever you post formatted text (including, but not limited to, code) on this site, type these 6 characters:
    \(small letters only, inside curly brackets) before and after each section of formatted text, to preserve spacing.
    Package body.
    CREATE OR REPLACE PACKAGE BODY PERSONLIZATION_NEW AS
    ITEM_ID NUMBER;
    BRANCH_CODE NUMBER;These global variables aren't being used anywhere, but they're not causing the error.    
    FUNCTION PO_ITEM_BRANCH (ITEM_ID NUMBER, BRANCH_CODE VARCHAR2)
    RETURN NUMBER IS RESULT NUMBER;
    You've got two copies of the function signature here.  Remove one of them.
    >
    FUNCTION PO_ITEM_BRANCH (ITEM_ID NUMBER, BRANCH_CODE VARCHAR2)
    RETURN NUMBER IS
    RESULT NUMBER;
    BEGIN
    SELECT
    count(a.asset_number) into result
    FROM
    SELECT
    c.CATEGORY_ID,
    a.ASSET_NUMBER
    FROM
    FA_ADDITIONS A
    ,FA_CATEGORIES_VL C
    ,FA_BOOKS B
    ,FA_LOCATIONS FL
    ,FA_DISTRIBUTION_HISTORY DH
    ,FA_TRANSACTION_HEADERS TH
    WHERE
    A.ASSET_CATEGORY_ID=C.CATEGORY_ID
    AND A.ASSET_ID=B.ASSET_ID
    AND A.ASSET_ID=TH.ASSET_ID
    AND TH.TRANSACTION_TYPE_CODE='ADDITION'
    AND B.TRANSACTION_HEADER_ID_IN=TH.TRANSACTION_HEADER_ID
    AND B.ASSET_ID=TH.ASSET_ID
    AND A.ASSET_ID=DH.ASSET_ID
    AND DH.LOCATION_ID=FL.LOCATION_ID
    AND TH.TRANSACTION_TYPE_CODE='ADDITION'
    --AND  FL.SEGMENT4 = 'Shalimar Campus Lahore'
    AND TH.TRANSACTION_TYPE_CODE <> 'FULL RETIREMENT'
    -- AND FL.SEGMENT4 = (SELECT flex_value FROM fnd_flex_values WHERE ATTRIBUTE1 = '04010303')
    AND A.ASSET_CATEGORY_ID IN (
    SELECT
    msi.asset_category_id
    FROM
    po_requisition_lines_all b,
    mtl_system_items_b msi
    WHERE
    b.ITEM_ID = msi.INVENTORY_ITEM_ID
    AND msi.inventory_item_id(+) = B.item_id
    AND msi.organization_id(+) = B.destination_organization_id
    AND b.item_id = ITEM_ID
    AND FL.SEGMENT4 = (
    SELECT
    (SELECT FLEX_VALUE FROM fnd_flex_values WHERE ATTRIBUTE1 = B.ATTRIBUTE2) BRANCH
    FROM
    po_requisition_lines_all b,
    mtl_system_items_b msi
    WHERE
    b.ITEM_ID = msi.INVENTORY_ITEM_ID
    AND msi.inventory_item_id(+) = B.item_id
    AND msi.organization_id(+) = B.destination_organization_id
    AND b.ATTRIBUTE2 = BRANCH_CODE
    ) ALooks like you're missing a ; above.
    >
    RETURN(RESULT);
    END;
    --END PERSONLIZATION_NEW;The END statement for the package is commented out.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

Maybe you are looking for