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

Similar Messages

  • 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
    );

  • 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

  • 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

  • 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?

  • 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?

  • SQL Error: ORA-00936: missing expression

    Hello all,
    sorry i can't speak english very well
    i would like to know what's wrong 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 working 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 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;Thank's all

    Hello ahmed,
    I noticed two errors in your update statment:
    Here is the corrected:
    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)
           END
          The changes made are
    1) removed keyword ANY which was placed by you before the Case statement
    2) removed alise "NEW MOB" of the column which you put after END keyword.. Its not needed in update statement..
    HTH
    Regards,
    Dipali..

  • JBO-26080: Error while selecting entity / ORA-00936: missing expression

    Dear All
    i have the below master VO based on EO , while trying to update any record in it and while commit , i'm getting the below error (ORA-00936: missing expression) however i don't have any missing exp in my ClaimsSubmissionsEO) !
    Note : JDeveloper 11.1.2.0
    SELECT ClaimsSubmissionsEO.BATCH_REF,
    ClaimsSubmissionsEO.PORTAL_TRANS_ID,
    ClaimsSubmissionsEO.RECEIVED_DATE,
    ClaimsSubmissionsEO.BOX_NO,
    ClaimsSubmissionsEO.POLICY_NO,
    (select E_NAME from tajcrs.policy where policy_no = ClaimsSubmissionsEO.policy_no) AS ENAME,
    ClaimsSubmissionsEO.CURRENCY,
    (SELECT e_currency_desc FROM EDGE.CURRENCY WHERE currency_code = ClaimsSubmissionsEO.Currency) AS CURRENCYDESC,
    ClaimsSubmissionsEO.IN_OUT_KSA,
    ClaimsSubmissionsEO.PORTAL_USER_NAME,
    ClaimsSubmissionsEO.PLAN_TYPE,
    ClaimsSubmissionsEO.PLAN_ID,
    (SELECT E_DESC FROM TAJCRS.PLANS WHERE PLAN_NO = ClaimsSubmissionsEO.PLAN_ID) AS PLANNAME,
    ClaimsSubmissionsEO.PATIENT_FILE_NO,
    ClaimsSubmissionsEO.ACCOUNT_CODE,
    ClaimsSubmissionsEO.BIRTH_DATE,
    ClaimsSubmissionsEO.MEMBER_AGE,
    ClaimsSubmissionsEO.PHYSICIAN_CATEGORY,
    ClaimsSubmissionsEO.CLAIM_DATE,
    (select BRANCH_CODE from tajcrs.policy where policy_no = ClaimsSubmissionsEO.policy_no) AS BRANCH,
    (select QUOTATION_NO from tajcrs.policy where policy_no = ClaimsSubmissionsEO.policy_no) AS QUOTATION,
    (select CUST_ID from tajcrs.policy where policy_no = ClaimsSubmissionsEO.policy_no) AS CUST_ID,
    (select BUS_TYPE from tajcrs.policy where policy_no = ClaimsSubmissionsEO.policy_no) AS BUS_TYPE,
    (select DATE_FROM from tajcrs.policy where policy_no = ClaimsSubmissionsEO.policy_no) AS DATE_FROM,
    (select DATE_TO from tajcrs.policy where policy_no = ClaimsSubmissionsEO.policy_no) AS DATE_TO
    FROM TAJCRS.CLAIMS_SUBMISSIONS ClaimsSubmissionsEO
    oracle.jbo.DMLException: JBO-26080: Error while selecting entity for ClaimsSubmissionsEO
         at oracle.jbo.server.OracleSQLBuilderImpl.doEntitySelectForAltKey(OracleSQLBuilderImpl.java:1113)
         at oracle.jbo.server.BaseSQLBuilderImpl.doEntitySelect(BaseSQLBuilderImpl.java:552)
         at oracle.jbo.server.EntityImpl.doSelect(EntityImpl.java:8287)
         at oracle.jbo.server.EntityImpl.lock(EntityImpl.java:5947)
         at DataModel.BC.EO.ClaimsSubmissionsEOImpl.lock(ClaimsSubmissionsEOImpl.java:7200)
         at oracle.jbo.server.EntityImpl.beforePost(EntityImpl.java:6467)
         at oracle.jbo.server.EntityImpl.postChanges(EntityImpl.java:6683)
         at DataModel.BC.EO.ClaimsSubmissionsEOImpl.postChanges(ClaimsSubmissionsEOImpl.java:238)
         at oracle.jbo.server.DBTransactionImpl.doPostTransactionListeners(DBTransactionImpl.java:3264)
         at oracle.jbo.server.DBTransactionImpl.postChanges(DBTransactionImpl.java:3067)
         at oracle.jbo.server.DBTransactionImpl.commitInternal(DBTransactionImpl.java:2071)
         at oracle.jbo.server.DBTransactionImpl.commit(DBTransactionImpl.java:2352)
         at oracle.adf.model.bc4j.DCJboDataControl.commitTransaction(DCJboDataControl.java:1590)
         at oracle.adf.model.binding.DCDataControl.callCommitTransaction(DCDataControl.java:1414)
         at oracle.jbo.uicli.binding.JUCtrlActionBinding.doIt(JUCtrlActionBinding.java:1428)
         at oracle.adf.model.binding.DCDataControl.invokeOperation(DCDataControl.java:2168)
         at oracle.jbo.uicli.binding.JUCtrlActionBinding.invoke(JUCtrlActionBinding.java:731)
         at oracle.jbo.uicli.jui.JUActionBinding.actionPerformed(JUActionBinding.java:193)
         at oracle.jbo.uicli.controls.JUNavigationBar.doAction(JUNavigationBar.java:412)
         at oracle.jbo.jbotester.NavigationBar.doAction(NavigationBar.java:112)
         at oracle.jbo.uicli.controls.JUNavigationBar$NavButton.actionPerformed(JUNavigationBar.java:118)
         at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
         at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
         at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
         at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
         at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
         at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:272)
         at java.awt.Component.processMouseEvent(Component.java:6289)
         at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
         at java.awt.Component.processEvent(Component.java:6054)
         at java.awt.Container.processEvent(Container.java:2041)
         at java.awt.Component.dispatchEventImpl(Component.java:4652)
         at java.awt.Container.dispatchEventImpl(Container.java:2099)
         at java.awt.Component.dispatchEvent(Component.java:4482)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
         at java.awt.Container.dispatchEventImpl(Container.java:2085)
         at java.awt.Window.dispatchEventImpl(Window.java:2478)
         at java.awt.Component.dispatchEvent(Component.java:4482)
         at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:644)
         at java.awt.EventQueue.access$000(EventQueue.java:85)
         at java.awt.EventQueue$1.run(EventQueue.java:603)
         at java.awt.EventQueue$1.run(EventQueue.java:601)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
         at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
         at java.awt.EventQueue$2.run(EventQueue.java:617)
         at java.awt.EventQueue$2.run(EventQueue.java:615)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:614)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
         at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
    Caused by: java.sql.SQLSyntaxErrorException: ORA-00936: missing expression
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:440)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396)
         at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:837)
         at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:445)
         at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:191)
         at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:523)
         at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:207)
         at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:862)
         at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1153)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1275)
         at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3576)
         at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3620)
         at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1491)
         at oracle.jbo.server.OracleSQLBuilderImpl.doEntitySelectForAltKey(OracleSQLBuilderImpl.java:863)
         ... 57 more
    ## Detail 0 ##
    java.sql.SQLSyntaxErrorException: ORA-00936: missing expression
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:440)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396)
         at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:837)
         at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:445)
         at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:191)
         at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:523)
         at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:207)
         at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:862)
         at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1153)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1275)
         at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3576)
         at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3620)
         at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1491)
         at oracle.jbo.server.OracleSQLBuilderImpl.doEntitySelectForAltKey(OracleSQLBuilderImpl.java:863)
         at oracle.jbo.server.BaseSQLBuilderImpl.doEntitySelect(BaseSQLBuilderImpl.java:552)
         at oracle.jbo.server.EntityImpl.doSelect(EntityImpl.java:8287)
         at oracle.jbo.server.EntityImpl.lock(EntityImpl.java:5947)
         at DataModel.BC.EO.ClaimsSubmissionsEOImpl.lock(ClaimsSubmissionsEOImpl.java:7200)
         at oracle.jbo.server.EntityImpl.beforePost(EntityImpl.java:6467)
         at oracle.jbo.server.EntityImpl.postChanges(EntityImpl.java:6683)
         at DataModel.BC.EO.ClaimsSubmissionsEOImpl.postChanges(ClaimsSubmissionsEOImpl.java:238)
         at oracle.jbo.server.DBTransactionImpl.doPostTransactionListeners(DBTransactionImpl.java:3264)
         at oracle.jbo.server.DBTransactionImpl.postChanges(DBTransactionImpl.java:3067)
         at oracle.jbo.server.DBTransactionImpl.commitInternal(DBTransactionImpl.java:2071)
         at oracle.jbo.server.DBTransactionImpl.commit(DBTransactionImpl.java:2352)
         at oracle.adf.model.bc4j.DCJboDataControl.commitTransaction(DCJboDataControl.java:1590)
         at oracle.adf.model.binding.DCDataControl.callCommitTransaction(DCDataControl.java:1414)
         at oracle.jbo.uicli.binding.JUCtrlActionBinding.doIt(JUCtrlActionBinding.java:1428)
         at oracle.adf.model.binding.DCDataControl.invokeOperation(DCDataControl.java:2168)
         at oracle.jbo.uicli.binding.JUCtrlActionBinding.invoke(JUCtrlActionBinding.java:731)
         at oracle.jbo.uicli.jui.JUActionBinding.actionPerformed(JUActionBinding.java:193)
         at oracle.jbo.uicli.controls.JUNavigationBar.doAction(JUNavigationBar.java:412)
         at oracle.jbo.jbotester.NavigationBar.doAction(NavigationBar.java:112)
         at oracle.jbo.uicli.controls.JUNavigationBar$NavButton.actionPerformed(JUNavigationBar.java:118)
         at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
         at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
         at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
         at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
         at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
         at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:272)
         at java.awt.Component.processMouseEvent(Component.java:6289)
         at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
         at java.awt.Component.processEvent(Component.java:6054)
         at java.awt.Container.processEvent(Container.java:2041)
         at java.awt.Component.dispatchEventImpl(Component.java:4652)
         at java.awt.Container.dispatchEventImpl(Container.java:2099)
         at java.awt.Component.dispatchEvent(Component.java:4482)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
         at java.awt.Container.dispatchEventImpl(Container.java:2085)
         at java.awt.Window.dispatchEventImpl(Window.java:2478)
         at java.awt.Component.dispatchEvent(Component.java:4482)
         at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:644)
         at java.awt.EventQueue.access$000(EventQueue.java:85)
         at java.awt.EventQueue$1.run(EventQueue.java:603)
         at java.awt.EventQueue$1.run(EventQueue.java:601)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
         at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
         at java.awt.EventQueue$2.run(EventQueue.java:617)
         at java.awt.EventQueue$2.run(EventQueue.java:615)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:614)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
         at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
    Edited by: Oracle ITself on Aug 29, 2011 5:36 AM
    Edited by: Oracle ITself on Aug 29, 2011 5:36 AM

    chk this
    SQL syntax exception: missing expression?
    http://www.coderanch.com/t/302720/JDBC/java/missing-expression-error

  • [SQL Question] ORA-00936: missing expression --- Possible Error on subquery

    I have one query that is basically three subqueries together.
    If I separate them, they run correctly, but once I put them together I get the Oracle error:
    ORA-00936: missing expression
    select associate_id, application_id, entity_id, profile_id, language, neutrals,
    created_date, sf_completed_date, completed_time, parent_respondent, parent_aid, attempt, parent_attempt,
    reported_top1, reported_top2, reported_top3, reported_top4, reported_top5, top1, top2, top3, top4, top5
         from profiles p1
              where sf_completed_date < to_date('15-aug-2006 00:00:00','DD-MM-YYYY HH24:MI:SS')
              and parent_respondent is null
              and parent_aid is null
              and neutrals < 155
              and p1.attempt in
    (select nvl(max(attempt),0)
         from profiles p2
              where p2.associate_id = p1.associate_id
              and p1.associate_id in)
    (select p1.associate_id, count(*) as count
         from
    (select top1 as theme
         from p1.profiles
         union all
    select top2 as theme
         from p1.profiles
         union all
    select top3 as theme
         from p1.profiles
         union all
    select top4 as theme
         from p1.profiles
         union all
    select top5 as theme
         from p1.profiles)
         group by theme);
    I'm using Golden, and this is the SQL where the error is happening:
    and p1.associate_id in)
    (select p1.associate_id, count(*) as countWhat is the best way to get this to run? Is it something with the way the subquery is written?
    thanks

    Try this:
    and   p1.attempt in (select nvl(max(attempt),0)
                         from   profiles p2
                         where  p2.associate_id = p1.associate_id
                         and p1.associate_id in
                           (select p1.associate_id
                                 , count(*) as count
                            from (select top1 as theme
                                  from   p1.profiles
                                  union  all
                                  select top2 as theme
                                  from   p1.profiles
                                  union  all
                                  select top3 as theme
                                  from   p1.profiles
                                  union  all
                                  select top4 as theme
                                  from   p1.profiles
                                  union  all
                                  select top5 as theme
                                  from   p1.profiles
                            group by theme
    ;

  • ORA-00936: Missing Expression? please help

    i just created the following function. I am passing the parameter, which is a varchar2 datatype. The result i am trying to get from this function is also a varchar2, which makes sense since the table is a table that only has varchar2 datatypes. . .so i guess i need to convert the result to a number. How do i do this? I don't quite know the syntax.
    when i try and run what i have i get the following error:
    ORA-00936: missing expression
    ORA-06512: at "SMSRPT.GET_NUMBER", line 8
    ORA-06512: at line 7
    create or replace FUNCTION get_number(p_name VARCHAR2) return NUMBER as
    --DECLARE
    v_value varchar2(100);
    v_result varchar2(100);
         BEGIN
              v_value:='select value from config_params where name='||p_name;
              execute immediate v_value into v_result;
    return v_result;
    END;

    How about this (updating polasa's response)
    CREATE OR REPLACE FUNCTION new_number(p_name VARCHAR2) RETURN NUMBER AS
    v_value VARCHAR2(1000);
    v_result NUMBER;
    BEGIN
    v_value :=('select value from config_param where name = :1');
    EXECUTE IMMEDIATE v_value
    INTO v_result USING p_name;
    RETURN v_result;
    END new_number;or this
    CREATE OR REPLACE FUNCTION get_number(p_name VARCHAR2) RETURN NUMBER AS
       v_value VARCHAR2(1000);
       v_result NUMBER;
       TYPE rct_cursor IS REF CURSOR; --REF CURSOR for dynamic Cursors.
       d_sql        rct_cursor;
    BEGIN
      v_value := 'select value from config_param where name = :1';
      OPEN d_sql
      FOR v_value
        USING p_name;
      FETCH d_sql INTO v_result;
      IF d_sql%NOTFOUND THEN
         v_result := NULL;
      END IF;
      CLOSE d_sql;
      RETURN v_result;
    END get_number; so the answer is "yes it can be done in dynamic SQL". The question is why do you want to given the advantages of static SQL over dynamic SQL?

  • 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

  • ORA-00936:missing expression Error

    I have what I would think was a simple SQL for Excel; but for some reason I keep getting the ORA-00936 missing expression error message.
    The SELECT AND FROM of the SQL are no problem. It's the Where portion of the SQL statement where it messes up. I have many user input required parameters. But I tested out the same SQL statement in Toad for Oracle and it worked fine.
    I'm wondering at this point if it's just too much for Excel.
    Here's the code from the "Where" portion of the SQL that worked in Toad for Oracle. I believe I have to change some of the syntax to get it to work in Excel; and I'm wondering if anyone knows the true correct way to do this. Because I'm also wondering if that's where I'm going wrong.
    Anyway, here's the code:
    WHERE (    (a_compl_summary.product_division = 'CP')
            AND (    a_compl_summary.entry_date >= :date1
                 AND a_compl_summary.entry_date <= :date2
            AND (   a_compl_summary.product_family LIKE :pf1
                 OR a_compl_summary.product_family LIKE :pf2
                 OR a_compl_summary.product_family LIKE :pf3
                 OR a_compl_summary.product_family LIKE :pf4
                 OR a_compl_summary.product_family LIKE :pf5
            AND (a_compl_summary.region = :r1)
            AND (   a_compl_summary.NAME = :c1
                 OR a_compl_summary.NAME = :c2
                 OR a_compl_summary.NAME = :c3
                 OR a_compl_summary.NAME = :c4
                 OR a_compl_summary.NAME = :c5
            AND (a_compl_summary.complaint = :yorn)
            AND (   rp_qa_reported_device_codes.reported_dev_clarification LIKE
                                                                              :cl1
                 OR rp_qa_reported_device_codes.reported_dev_clarification LIKE
                                                                              :cl2
                 OR rp_qa_reported_device_codes.reported_dev_clarification LIKE
                                                                              :cl3
                 OR rp_qa_reported_device_codes.reported_dev_clarification LIKE
                                                                              :cl4
                 OR rp_qa_reported_device_codes.reported_dev_clarification LIKE
                                                                              :cl5
            AND (rp_qa_reported_device_codes.reported_dev_clarification NOT LIKE
                                                                              :dc1
            AND (a_compl_summary.incident_number =
                                               rp_qa_patient_codes.incident_number
            AND (a_compl_summary.case_number = rp_qa_patient_codes.case_number)
            AND (a_compl_summary.part_sequence = rp_qa_patient_codes.part_sequence
            AND (a_compl_summary.incident_number =
                                       rp_qa_reported_device_codes.incident_number
            AND (a_compl_summary.case_number =
                                           rp_qa_reported_device_codes.case_number
            AND (a_compl_summary.part_sequence =
                                         rp_qa_reported_device_codes.part_sequence
            AND (rp_qa_reported_device_codes.incident_number =
                                               rp_qa_patient_codes.incident_number
            AND (rp_qa_reported_device_codes.case_number =
                                                   rp_qa_patient_codes.case_number
            AND (rp_qa_reported_device_codes.part_sequence =
                                                 rp_qa_patient_codes.part_sequence
           )

    But are the ":parameter1" okay, or do I need to change the syntax for Excel?
    Because when I change the[b] :parameter to just a ? it ends up working to a degree. When I have too many parameters Excel ends up bailing on me with a Debug, Send Error Report box popping up.

  • ORA-00936 Missing expression - error in composite statement

    I'm using the following statement to call a function which uses a number retrieved from a table i.e.
    SELECT GETNEXTBUSINESSDATE(TO_DATE('28/08/2003','dd/mm/yyyy'), TO_NUMBER(SELECT VALUE1 FROM PARAMETERS WHERE PARCODE = 'CCR1' AND ATTRIBUTE1 = 'CCRNRQST1')) FROM DUAL;
    The function adds the value store in the value1 field to a date to get the next buisness date. The above statement is giving me an ORA-00936 Missing expression error message.
    Can anybody help ?

    We can't pass a query as a parameter.
    You'll have to write a function that accepts PARCODE and ATTRIBUTE1 as parameters, or figure some other way of getting the value.
    As I typed that, it occurred to me that this might work:
    SELECT GETNEXTBUSINESSDATE(TO_DATE('28/08/2003','dd/mm/yyyy')
          , x.val1)
    FROM ( SELECT TO_NUMBER(VALUE1) as val1
           FROM   PARAMETERS
           WHERE PARCODE = 'CCR1'
           AND ATTRIBUTE1 = 'CCRNRQST1') x;I'm not guaranteeing anything as I've never tried running a function from an in-line view.
    Cheers, APC

  • JDBC receiver - "ORA-00936:missing expression" error at sync.select command

    Hi again,
    questions, questions....
    This is my select on the JDBC rec.connection:
    I think this is a select with an AND (two criteria).
    How does it look for an OR ?
    At the moment we have another error:
    Error when executing statement for table/stored proc. 'IRIS.T_ST_MAINDRIVER' (structure 'STATEMENT'): java.sql.SQLException: ORA-00936: missing expression
    Hello experts,
    what is this? I don´t think that a select calls a stored procedure which is the only result for threads when searching in this forum!
    regards
    Dirk

    Hi,
    Are you trying to execute a Stored Procedure?
    You can't get the result from an Oracle SP with JDBC. The problem is about the cursor return from SP, that couldn't bre understood by JDBC adapter.
    You can, make a .NET wrapper to it. Make a .NET web service that gets the parameters from XI and runs the SP with them, get the oracle cursor return, transform it into a XML message and return it to the XI SOAP adapter. I've tryied and it works fine - and as I could see is the only way to perform calls to Oracle SPs with cursor return in XI.
    hope this helps!
    roberti
    Message was edited by:
            Waldemar Roberti

  • Native SQL Query Error: DBIF_DSQL2_SQL_ERROR -- ORA-00936: missing express

    Hi,
    I tried to read data using the following SQL Query,
    fp_work = 'ABCD'.
      EXEC SQL PERFORMING WRITE_TO_ITAB .
      SELECT fp_code, bank_acc_code, bank_acc_num,
      INTO :gs_cds_data-FP_CODE,
               :gs_cds_data-BANK_ACC_CODE,
               :gs_cds_data-BANK_ACC_NUM,
       FROM  BANK_TABLE
      WHERE fp_code = :fp_wrk
      ENDEXEC.
    *&      Form  WRITE_to_itab
    FORM write_to_itab.
    To move the data into the Internal Table.
      APPEND gs_cds_data TO gt_cds_data.
      CLEAR  gs_cds_data.
    ENDFORM.                    "WRITE_to_itab
    and im getting the run time error..
    What happened?                                                                               
    The error occurred in the current database connection "SAPABC".                                                                               
    How to correct the error                                                                               
    Database error text........: "ORA-00936: missing expression"             
    Triggering SQL statement...: "FETCH NEXT "                               
    Internal call code.........: "[DBDS/NEW DSQL]"                           
    Please check the entries in the system log (Transaction SM21).                                                                               
    You may able to find an interim solution to the problem                  
    in the SAP note system. If you have access to the note system yourself,  
    use the following search criteria:                                                                               
    "DBIF_DSQL2_SQL_ERROR" C                                                                               
    If you cannot solve the problem yourself, please send the                
    following documents to SAP:
    Can anyone give me a solution to correct this error?
    In addition, Can i omit the WHERE clause, as i need to get all the data in the oracle database?

    BUT,
          EXEC SQL.
            connect to :LV_DB_NAME as :sy-uname
          ENDEXEC.
          EXEC SQL.
            SET CONNECTION :sy-uname
          ENDEXEC.
         check sy-subrc..
    connection is happening.. with sy-subrc value as ZERO

Maybe you are looking for

  • Photos in the wrong place how to move to the right place

    I came back from vacation and attached my camera to get my photos to iphoto 6.02 I gave it a roll name and a description and downloaded the photos. I disconnected the camera. For some reason all my photos were placed in 2004 and there was no album cr

  • Need to know about charges if reinstalling Mountain Lion.

    Hi! I bought a secondhand Macbook and it has mountain lion installed, I erased the hard drive and reinstalled ML twice. Will I be charged even if I already have a mountain lion installed on an iMac? I'm just worried that my credit card will be charge

  • How to install driver for Windows 8.1 without physical connection

    I have a Photosmart 7762 printer connected to a NAS box (with wiring all very difficult to get to behind various office units) and want to be able to print to it from a new Windows 8.1 PC that is installed (again with difficult to get to wiring) in a

  • Running total of calculated field in pivot

    VERSION: ORACLE 11 TABLE: create table chart_detail ( DIS        NUMBER, BLD_MO VARCHAR2(7), BLD        NUMBER(10), RPLC      NUMBER(10));DATA: insert into chart_detail values (60,'2011-03',0,2); insert into chart_detail values (150,'2011-04',10572,0

  • Openbox and maximized windows

    Hi everyone... Im running Arch with openbox as my main DE. I really like it, but there is just one thing that make me angry. When i open an application (such as firefox or dolphin) its window appears covering almost the size of my screen. I have to m