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

Similar Messages

  • Error handling function: ORA-20001: get_dbms_sql_cursor error:ORA-00942: table or view does not exist  is not trapped. Why?

    Why APEX 4.1 Error handling function does not trap  the error of missing table?
    Say, I create simple application with single IR report page and I also assign standard simple error handling function.
    Function works perfectly, except but this case:
    If I just drop a table used by report page and then refresh the page I am getting usual APEX error message:
    ORA-20001: get_dbms_sql_cursor error ORA-00942: table or view does not exist
    and error handling function is not invoked at all.
    Is this a feature or a bug?

    Hi,
    Check the corrections given in the note 990764:
    Reason and Prerequisites
    Up to now, using a characteristic with its own master data read class as the InfoProvider was not supported. This is now released but it is not available for all modelings. Using the attributes in the query is not supported for characteristics that have their own master data read class. Using the attributes in the query causes a termination. The following errors may occur in this case:
    ORA-00942: table or view does not exist
    Fehler in CL_SQL_RESULT_SET  Include NEXT_PACKAGE
    RAISE_READ_ERROR in CL_RSDRV_VPROV_BASE
    Solution
    SAP NetWeaver 2004s BI
               Import Support Package 11 for SAP NetWeaver 2004s BI (BI Patch 11 or SAPKW70011) into your BI system. The Support Package is available once Note 0914305 "SAPBINews BI 7.0 Support Package 11", which describes this Support Package in more detail, has been released for customers.
    In urgent cases you can implement the correction instructions.
    The correction instructions contain the tightened inspection for characteristics.
    Regards,
    Anil Kumar Sharma .P

  • IR: ORA-20001: get_dbms_sql_cursor error ORA-00904: : invalid identifier

    Hi everyone,
    has anyone else had this error which has been driving me round the bend during the last three days?
    I have an interactive report which used to work fine.
    Now it happens (when the page loads/a filter is en- or disabled) that - from time to time, but unpredictable - I receive
    ORA-20001: get_dbms_sql_cursor error ORA-00904: : invalid identifier
    The report is based on a table function.
    I will try to set up a testcase and post the link here, but so far I haven't managed to force the error to occur.
    But maybe someone else has already bumped into this kind of error? I would be grateful for any hints!
    Best regards,
    Sabine
    Application Express 4.1.0.00.32
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production

    Hi Jari,
    I changed the type definition (the return type of the table function) and extended the select list in the source of the IR.
    I do not use 'select *' but reference every column explicitly. So APEX easked me whether to add the new column.
    I also tried deleting in recreating the region, but no luck.
    Any more ideas?
    Best regards,
    Sabine

  • Solved: ORA-20001: get_dbms_sql_cursor error ORA-01445: cannot select ROWID

    I got an error, googled it and couldn't find a good answer. Joe Fuda helped me to fix the problem. Here is the answer for future google results.
    Error:
    ORA-20001: get_dbms_sql_cursor error ORA-01445: cannot select ROWID from, or sample, a join view without a key-preserved table
    Query that triggered the error:
    SELECT
    p.rowid
    , p.product_id
    , p.product_type
    , p.product_name
    , p.product_description
    FROM
    product p
    , link_release_product rp
    WHERE
    rp.release_id = 1
    AND
    p.product_id = rp.product_id
    This is casued by the keyword "rowid".
    The same error occurs if 'p.rowid' is replaced with 'p."ROWID"'.
    You can replicate this error in SQL Command by adding wrapping the query with 'select * from ( [the query] )'
    Fix:
    Add an alias to 'p.rowid' so the query is now like:
    SELECT
    p.rowid product_rowid
    , p.product_id
    , p.product_type
    Reason:
    Unclear, it might have something to do with how APEX does pagination.

    ok, found the answer... it has to do with the single row view issue addressed in this thread... ORA-01446 on Interactive query
    (sorry if there's a better way to link to other threads in this forum).

  • ORA-20001: get_dbms_sql_cursor

    I am getting this error in an interactive report, the same query returns result in the sql workshop but not in the report. The query uses a dblink to access data in another database.
    The error I get is ORA-20001: get_dbms_sql_cursor error ORA-01747: invalid user.table.column, table.column, or column specification. I tried searching in this forum, but of no use.
    My Application Express 4.0.0.00.46 is running on oracle XE on windows XP machine. Can somebody help me understand this issue.

    Hi,
    SQLWorkshop uses the ANONYMOUS user to access the DB. When using application the Default Parsing schema credentials are used to access the DB/DBlinks.
    Most probably your Application Workspace Default Schema does not have access to the DB Link.
    Does the query run in a Classic report? Or from SQLPlus when you are connected as the Dfault Schema Owner of the Workspace where your application resides?
    Regards,

  • Scheduled Map Error: ORA-20001: Internal error ...

    I have a scheduled map that is failing daily - the full error message is below. The map is for a cube. The map validates, deploys and runs SUCCESSFULLY when started from the OWB control center.
    The schedule is simple: once a day @ 0600.
    The Map is configured: Row Based (Target Only), No Ansi, No Optimization, No Target Load Order, Table Analzye, 500 Bulk Load, 500 commit.
    The run time environment consists of: Windows Server 2003 SP1 x64, Oracle 10G x64 patched to the latest revision.
    Any ideas appreciated.
    Error from from Enterprize Manager 10g for the scheduled job:
    ORA-20001: ORA-20001: Begin. initialize complete. l_job_audit_execution_id= 3261. execute_task complete. l_audit_execution_id= 7194. l_stream_id= 11434. ORA-20001: Internal error ORA-20001: Execution completed with 0 error(s) and 1 warning(s). ORA-06512: at "D2D_REPO_OWNER.WB_RTI_WORKFLOW_UTIL", line 769 ORA-20001: Execution completed with 0 error(s) and 1 warning(s). ORA-06512: at "D2D_WH.PGRN_WARE_MEASUREMENT_MP_JOB", line 113 ORA-20001: Internal error ORA-20001: Execution completed with 0 error(s) and 1 warning(s). ORA-06512: at "D2D_REPO_OWNER.WB_RTI_WORKFLOW_UTIL", line 769 ORA-20001: Execution completed with 0 error(s) and 1 warning(s).

    OWB Control Center reports the error for the daily runs as below.
    I've seen this before - when the map is configured for set based fail over to row base. The deeper meaning appears to be duplicate data in the source.
    The Job details (Input Parameters) confirm that this job is running with a configuration that differs from what I've configured in the Repository - therefore I need to redeploy the map. I know I did this yesterday but somehow its wrong!
    ORA-30926: unable to get a stable set of rows in the source tables

  • ORA-20001: Oracle error -20001: ORA-20001: Oracle error -14552: ORA-14552: cannot perform a DDL, commit or rollback inside a query or DML has been detected in fnd_global.set_nls.set_parameter('NLS_LANGUAGE','AMERICAN'). has been detected in fnd_global.set

    ORA-20001: Oracle error -20001: ORA-20001: Oracle error -14552: ORA-14552: cannot perform a DDL, commit or rollback inside a query or DML has been detected in fnd_global.set_nls.set_parameter('NLS_LANGUAGE','AMERICAN'). has been detected in fnd_global.set_nls.
    this error generates everytime when i run a apex application
    i did call the package in session state with  dbms_session.set_nls('NLS_LANGUAGE','AMERICAN'); but still it shows the error in the report any solution please

    Hi Amrit
    Can you put the FND_GLOBAL calls in a pre map trigger/process rather than as part of the map?
    Cheers
    David

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

  • Import failing with ORA-20001: GET_BLOCK Error

    Hi All,
    I'm attempting to install an export of our Application into the LIVE environment (something I've done many times before), and it's failing with the following error message: -
    ORA-20001: GET_BLOCK Error. ORA-20001: GET_STMT error. ORA-20001: Execution of the statement was unsuccessful. ORA-06550: line 698, column 1: PLS-00103: Encountered the symbol ",'#DD#','#EE#');" when expecting one of the following: ) , * & = - + < / > at in is mod remainder not rem <an exponent (**)> <> or != or ~= >= <= <> and or like LIKE2_ LIKE4_
    The only part of the message that makes any sense to me is the '#DD#','#EE#' which looks like part of a Javascript Passback Function from one of the pages.
    Can anyone throw any light on why I'm getting this error message?
    Thanks,
    Mike

    Scott,
    I managed to track down the error. A column link URL I'm using calls a Javascript Passback Function as follows: -
    javascript:passBack('#A#','#B#','#C#','#D#','#E#','#F#','#G#','#H#','#I#','#J#','#K#','#L#','#M#','#N#','#O#','#P#','#Q#','#R#','#S#','#T#','#U#','#W#','#X#','#Y#','#Z#','#AA#','#BB#','#CC#','#DD#','#EE#');
    By reducing the length of this the import now works. The confusing part is that this was working previously.
    Cheers,
    Mike

  • Import Error ORA-20001:GET_BLOCK Error

    We are trying to upgrade from HTML DB version 1.4 to 1.6, and we have encountered some issues with one of our applications. I tried to import our app using the Create Application->Based on an Application Export File option, specifying we would like to reuse the application id inside the export file, and also specifying the app to be a Run/Build Application. During the installation, I received this error:
    ORA-20001: GET_BLOCK Error. ORA-20001: Execution of the statement was unsuccessful. ORA-00001: unique constraint (FLOWS_010600.WWV_FLOW_FLOW_PK) violated <pre>begin wwv_flow_api.create_flow( p_id =>122, p_display_id=>122, p_owner => 'TESTMGR', p_name => 'TEST', p_alias => '122', p_page_view_logging => 'YES', p_default_page_template=> 40824759845482865 + wwv_flow_api.g_id_offset, p_printer_friendly_template=> 40824564374
    Keep in mind, when I received this error, no apps were present on our test server or in any of our workspaces. Even after receiving this error, I was able to see the application in my workspace, and run through some of the pages and they appeared to be running okay(app contains 101 pages).
    I wanted to check to see if anyone knew what this error meant, so I don't spend hours upon hours testing something that isn't broken in the first place.
    Here's what else I noticed:
    I tried to reinstall the application over itself to see if I could recreate the error, but it installed fine.
    I deleted the app, installed the app telling HTML DB to reuse the app_id in the export file, and received the error again.
    But then I deleted the app altogether to try a different approach. I allowed HTML DB to auto assign the app_id and the app installed fine.
    What is even more strange, I imported and installed one of our smaller apps (only 14 pages, by telling HTML DB to reuse the application id present in the export file). That application installed perfectly without a hitch.
    So I guess my questions are:
    What does that error mean? Is it detremental to the usage of an app?
    Why do I only get the error with one application and not with another when I tell HTML DB to reuse the application id inside the export file?
    By the way,
    Export file sizes:
    Large App w/ error - 4.90MB
    Small App w/o error - 272KB
    Thank you for your help in advance!!!

    Thanks in Advance
    I am facing same issue of Primary key voilation. This error comes even when the application is imported first time.
    Other applications are importng file
    Details of error are as fallows
    ORA-20001: GET_BLOCK Error. ORA-20001: Execution of the statement was unsuccessful. ORA-00001: unique constraint (FLOWS_010500.WWV_FLOW_FLOW_PK) violated
    1852::begin
    wwv_flow_api.create_flow(
    p_id =>604,
    p_display_id=>604,
    p_owner => 'HMSIPD',
    p_name => 'IPD',
    p_alias => '604',
    p_page_view_logging => 'YES',
    p_default_page_template=> 210607950065627880 + wwv_flow_api.g_id_offset,
    p_printer_friendly_template=> 210607443998627880 + wwv_flow_api.g_id_offset,
    p_default_region_temp
    Size of application is : 5 MB
    Regards,
    Ankur Diwan

  • ORA-20001 GET_BLOCK-ERROR during the installation of an application

    hi people,
    I' ve got the following error during the installation of an application in apex 2.2.
    ORA-20001: GET_BLOCK Error. ORA-20001: Execution of the statement was unsuccessful. ORA-02047: cannot join the distributed transaction in progress <pre>begin execute immediate 'alter session set nls_numeric_characters='''||wwv_flow_api.g_nls_numeric_chars||'''';end;</pre>
    Can anybody help me?
    Message was edited by:
    user512746

    hi,
    db-version is oracle 10g r2
    os windows server 2003
    the error occured when two ore more people working in their workspaces but not when only one person working in his workspace
    Message was edited by:
    user512746
    Message was edited by:
    user512746

  • Copy Application - ORA-20001: GET_BLOCK Error. ORA-20001:

    Hi
    I am unable to make a copy of one of my apex applications, I get the error
    ORA-20001: GET_BLOCK Error. ORA-20001:
    Does anyone know how i can resolve this?
    Thanks in advance

    jk_apex_newby wrote:
    hi eric.
    i m getting same error. my development and reproduction specifications are as followsActually, if you read the OPs second message, you'll discover that it isn't entirely the same:
    >
    ORA-20001: GET_BLOCK Error. ORA-20001: Execution of the statement was unsuccessful. ORA-02047: cannot join the distributed transaction in progress <pre>begin execute immediate 'alter session set nls_numeric_characters=''.,'''; end; </pre>versus:
    ORA-20001: GET_BLOCK Error. ORA-20001: Execution of the statement was unsuccessful.
    ORA-06550: line 13, column 50: PLS-00103: Encountered the symbol &amp;quot;end-of-file&amp;quot;
    when expecting one of the following: &amp;lt;an identifier&amp;gt; &amp;lt;a double-quoted delimited-identifier&amp;gt;
    current delete exists prior &lt;pre&gt;declare h varchar2(32767) := null;
    begin wwv_flow_api.create_page_item( p_id=&amp;gt;3689529102880585 + wwv_flow_api.g_id_offset, p_flow_id=&amp;gt; wwv_fAs such I would highly recommend creating a brand new post and perhaps include a reference to this thread - you will likely get more help more quickly if you do...
    JC: I see that you have already posted a 2nd thread. Never mind...
    Edited by: Joel_C on 01-Nov-2011 14:30

  • ORA-20001: GET_BLOCK Error. ORA-20001: Execution of the statement was unsuc

    Hi All,
    I have exported a application and after that imported and tried to install it then i am getting this error:
    ORA-20001: GET_BLOCK Error. ORA-20001: Execution of the statement was unsuccessful. ORA-06550: line 5, column 1: PLS-00306: wrong number or types of arguments in call to 'CREATE_REPORT_COLUMNS' ORA-06550: line 5, column 1: PL/SQL: Statement ignored <pre>declare s varchar2(32767) := null; begin s := null; wwv_flow_api.create_report_columns ( p_id=&gt; 29524721731534348 + wwv_flow_api.g_id_offset, p_region_id=&gt; 29524015959534345 + wwv_flow_api.g_id_offset, p_flow_id=&gt; wwv_fl
    History which happen:
    everything was working fine in my workspace but 2 days back one of team member created customer demo application in the same work space so login was also failing and after struggling oneday i got that my authentication function was get overwritten by the demo user authentication so again i chaned by my bakup function now authentication is working but when i export my new developed application and tried to replace the existing application then i am getting the erroe which i have mention before.
    1: I tried to replace by existing one
    2: i tried to assign new application id
    nothing is working so is it problem occues due to new demo application creation which i have deleted or other problem if other then how to solve if by demo then what i need to do .
    But all applications are working well not able to install which i need to do with new developed application.
    Please help me i am in tough situation.
    Thanks in advance,
    Amit

    Amit,
    The next useful test would be to run the file in SQL*Plus, connected as the application parsing schema. If it works, you will have imported the application. After that, please send me the file ([email protected]) and I'll figure out where the trouble is. If it fails in SQL*Plus, try to isolate the failing block. You'll get a pretty good idea by the prompts echoed to the output indicating the import progress.
    Scott

  • Getting ORA-20001: Address_Cannot_be_Primary error while creating US Global

    Dear All,
    I am getting ORA-20001: Address_Cannot_be_Primary error while creating address record of address type US global.
    While analyzing the PYUPIP trace, I found the following piece of the code is causing issue:
    File : /* $Header: peusaddlh.pkb 120.0.12010000.2 2010/05/08 09:10:25 lbodired noship $ */
    Package : APPS.PER_US_ADD_LEG_HOOK.CREATE_US_ADDRESS
    Code check :
    IF (p_style <> 'US'
    AND P_PRIMARY_FLAG = 'Y'
    AND csr_emp_assign%FOUND) THEN
    close csr_emp_assign;
    hr_utility.set_message (800, 'Address_Cannot_be_Primary');
    hr_utility.raise_error;
    END IF;
    It seems that while applying this check the case of the US Global address style is not taken care.
    It has struck the address conversion, as all the records of my client has the address style US Global.
    Please suggest how it will effect if for the time being I do following code changes in the seeded package(I know it is not recommened, but can not wait for the patch).
    1. Comment the whole check
    2. Replace the above code with the follwoing code :
    IF (p_style not in ('US','US_GLB')
    AND P_PRIMARY_FLAG = 'Y'
    AND csr_emp_assign%FOUND) THEN
    close csr_emp_assign;
    hr_utility.set_message (800, 'Address_Cannot_be_Primary');
    hr_utility.raise_error;
    END IF;
    Looking for the prompt reply.
    regards
    Devender Yadav

    Dear All,
    Oracle has supplied the patch 9902020 for the fix of the issue.
    Now the payroll install check condition is also added in the check.
    Code in the check is now like this :
    IF (p_style <> 'US'
    AND P_PRIMARY_FLAG = 'Y'
    AND csr_emp_assign%FOUND
    AND hr_general.chk_product_installed('801') = 'TRUE') THEN
    close csr_emp_assign;
    hr_utility.set_message (800, 'Address_Cannot_be_Primary');
    hr_utility.raise_error;
    END IF;
    As my client has not installed the payroll, so the fix will work for us.
    Thanks to all of you for your replies.
    Regards
    Devender Yadav

  • 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

Maybe you are looking for

  • My iPhone 3GS is not backing up to iCloud.. Help, please?

    So I jusy got my iPhone back after not using it for 8 months. I tried to do an iCloud backup and it didn't work. I tired several times more and finally went online to see if there was a solution. I've tried everything I could find. I erased all my da

  • Change the default HTML template when saving for web

    Hi, Is there a way to change the default HTML output template when you go to "Save for web" and select "HTML & Images"? I would like to modify the default HTML <head> tag. Thanks.

  • Enhancement Spot ES_SAPLMRMB

    Hi experts, i have the enhancement spot ES_SAPLMRMB used in the function module standard MRM_INVOICE_VERIFICATION_NTASK; in this enhancement are definied three enhancement point, is it possible to create another enhancement point? If so, how can i do

  • How to solve 0xE8000001 issue

    I have built an simple app which runs fine in iPhone Simulator. But I got 0xE8000001 error when I tried to deploy it to iPhone device. I have tried various way, such as restart iphone, restart mac, put in provision info, and so on, all not work. The

  • Problems with startup / no sound / webvideos

    Hello everyone. Since I last updated my iMac two days ago 02/18/09 (accepting program updates, and also a security update from apple) my computer is running differently. The startup takes forever (wheel screen, blue screen) and and it seems that the