JSP Deployment:Tomcat:Oracle Prepared Statement error

I'm deploying my BC4J JSP application to Linux/Tomcat 4.0.1.
The html and basic jsp (Query form display) work but whenever I try to hit the database (i.e. display a browse or execute a query), I get the following in the Browser window:
Application Error
Return
Error Message: oracle.jdbc.driver.OraclePreparedStatement
There are no other messages. Everything works in the JDeveloper IDE.
I'm sure I've done something wrong in the configuration.
Can anyone point me in the right direction?
TIA
Thanks, George

Thanks for the info Sung.
We solved the problem late yesterday. The Tomcat documentation indicates that .jar files shared by the application and the server must reside in <Tomcat_home>/common/lib/. However, we went by the JDeveloper document which stated that most of the library files belong in <Tomcat_home>/lib/.
When we moved classes12.jar to /common/lib/ the problem was resolved.
In order to resolve other problems that arose, we had to move all of the indicated .jar files for JDeveloper into /common/lib/.
One of the JDeveloper documentation folks should probably evaluate this for a change to the documentation.
Thanks for your help!
Thanks, George

Similar Messages

  • Weblogic 8.1 Oracle prepared statement error

    I've got WLS 8.1SP1 running on Mac OS X (10.2.6, JDK 1.4.1) using the Oracle Thin
    driver to connect to a 9.2.0.1 db on WinXP. When I run a unit test that uses
    an XA connection, I get the error below (inside a much larger stack trace). I'm
    not getting this error with 7.0SP2 (with Mac JDK 1.3.1). Is anyone familiar with
    what the code is trying to do here?
    [junit] --------------- nested within: ------------------
    [junit] weblogic.utils.AssertionError: ***** ASSERTION FAILED *****[ Failed
    to generate class for weblogic.jdbc.rmi.internal.PreparedStatementImpl_weblogic_jdbc_wrapper_PreparedStatement_oracle_jdbc_driver_OraclePreparedStatement_811_WLStub
    ] - with nested exception:
    [junit] [java.lang.reflect.InvocationTargetException - with target exception:
        [junit] [java.lang.ArrayIndexOutOfBoundsException: 142]]
    [junit] at weblogic.rmi.internal.StubGenerator.generateStub(StubGenerator.java:807)
    [junit] at weblogic.rmi.internal.StubGenerator.generateStub(StubGenerator.java:790)
    [junit] at weblogic.rmi.extensions.StubFactory.getStub(StubFactory.java:79)
    [junit] at weblogic.rmi.utils.io.RemoteObjectReplacer.resolveObject(RemoteObjectReplacer.java:222)
    [junit] at weblogic.rmi.internal.StubInfo.readResolve(StubInfo.java:142)

    Craig,
    Normally AssertionError means that you hit the bug. Contact [email protected]
    for a resultion.
    Regards,
    Slava Imeshev
    <Craig Daniels cldanielsATcheckfree.com> wrote in message
    news:[email protected]..
    >
    I've got WLS 8.1SP1 running on Mac OS X (10.2.6, JDK 1.4.1) using theOracle Thin
    driver to connect to a 9.2.0.1 db on WinXP. When I run a unit test thatuses
    an XA connection, I get the error below (inside a much larger stacktrace). I'm
    not getting this error with 7.0SP2 (with Mac JDK 1.3.1). Is anyonefamiliar with
    what the code is trying to do here?
    [junit] --------------- nested within: ------------------
    [junit] weblogic.utils.AssertionError: ***** ASSERTION FAILED *****[Failed
    to generate class forweblogic.jdbc.rmi.internal.PreparedStatementImpl_weblogic_jdbc_wrapper_Prepa
    redStatement_oracle_jdbc_driver_OraclePreparedStatement_811_WLStub
    ] - with nested exception:
    [junit] [java.lang.reflect.InvocationTargetException - with target
    exception:>     [junit [java.lang.ArrayIndexOutOfBoundsException: 142]]
    [junit] atweblogic.rmi.internal.StubGenerator.generateStub(StubGenerator.java:807)
    [junit] atweblogic.rmi.internal.StubGenerator.generateStub(StubGenerator.java:790)
    [junit] atweblogic.rmi.extensions.StubFactory.getStub(StubFactory.java:79)
    [junit] atweblogic.rmi.utils.io.RemoteObjectReplacer.resolveObject(RemoteObjectReplace
    r.java:222)
    [junit] atweblogic.rmi.internal.StubInfo.readResolve(StubInfo.java:142)

  • Oracle Prepared Statement and spaces in field

    I have a field that is defined as char(10). It has characters like '39' in it. When I select against it using standard SQL (where clause) I get results. When I use it in the where clause of a prepared statement it does not return any rows.
    If I have the field defined as char(2) the prepared statement works.
    If I have the field defined as varchar2(10) and loaded with '39' the prepared statement works.
    If I have the field defined as varchar2(10) and loaded with '39 ' the prepared statement returns no results.
    I really do not think this is a JDBC problem. However, since Oracle's site basically <expletive deleted>, I am hoping someone here has a solution.
    Thanks in advance if you can help.

    Let me clarify.
    I cannot remove the whitespace from the data in the database. I do not need the whitespace to do the query if I am not using a Prepared Statement. This seems to be a problem with the way Oracle is handling the prepared statement. (hence.. my thinking that this is really not a JDBC problem at all.. but I could be wrong.)

  • Oracle Prepared Statement - 8.1.7 JDBC type II Driver

    Hi,
    I have a strange problem.
    I do a query using a prepared statement and there are no matching results.
    I change this to hardcoded SQL Statement and pass in the same value a row of record is returned
    I change this to Statement and pass in the input a row of record is returned.
    This is puzzling. There seems to be a problem with Prepared Statement and I can't see why that fails.
    The Stmt looks like this
    PreparedStatement id is defiend as a char in the database
    Code Snippet:
    SQL = Select * from employee where id = ?;
    pstmt.setString(1,'value');
    Hardcoded SQL:
    select * from employee where id = 'value';
    Statement Impl:
    String var = "value";
    "select * from employee where id = '" + var+ "'";
    Would appreciate if somebody can explain what's happening. To me it is bizarre!
    Thanks,
    Manglu

    Update to problem
    I have the latest (classes12.zip) JDBC drivers from Oracle.
    We are running Oracle 8.1.6 and converting to Oracle 8.1.7.
    This works the same with both.
    Example, I have a column (char(10)) with trailing spaces. i.e. '39 '.
    When I perform a Prepared Statement with that column in the where clause, it returns no result rows.
    When I perform a standard statement with that column in the where clause, it returns rows.
    When I define a column char(2) and use it in the where clause it works fine.
    When I define a column varchar2(10) and load it with data like '39', it works fine.
    When I define a column varchar2(10 and load it with data like '39 ', it does not work.
    When I execute this same Prepared Statement through the jdbc:odbc bridge it works fine.
    I cannot change the definition of the columns as they are foreign key data. What is the problem here? Any help is appreciated.
    If you need further information please feel free to contact me.

  • Ingres prepared statement error

    Hi there,
    I 'm encountering a very strange problem with a prepared statement and ingres.
    String strSQL = "select first 50 date_part('year', dtrans_date) as year, ccalled_place as place, "  +
    "count(*) as calls, " +
    "sum(nduration/60.0) as duration " +
    "from phone " +
    "where date_part('year', dtrans_date) = ? and cDest_type='C' " +
    "group by date_part('year', dtrans_date), ccalled_place " +
    "order by date_part('year', dtrans_date), calls desc";
    PreparedStatement ps = conn.prepareStatement(strSQL);          
    ps.setInt(1, 2000);
    rs = ps.executeQuery();It throws the exception:
    ca.gcf.util.SqlEx: An internal error prevents further processing of this query.
    Associated error messages which provide more detailed information about the problem can be found in the error log, II_CONFIG:errlog.log
         at ca.gcf.jdbc.DrvObj.readError(DrvObj.java:773)
         at ca.gcf.jdbc.DrvObj.readResults(DrvObj.java:629)
         at ca.gcf.jdbc.DrvPrep.<init>(DrvPrep.java:137)
         at ca.gcf.jdbc.DrvConn.getPrepStmt(DrvConn.java:786)
         at ca.gcf.jdbc.JdbcPrep.<init>(JdbcPrep.java:364)
         at ca.gcf.jdbc.JdbcConn.createPrep(JdbcConn.java:1550)
         at ca.gcf.jdbc.JdbcConn.prepareStatement(JdbcConn.java:1380)
         at TestIngresDB.query(TestIngresDB.java:37)
         at TestIngresDB.<init>(TestIngresDB.java:9)
         at TestIngresDB.main(TestIngresDB.java:55)This is exactly at the line:
    ps = conn.prepareStatement(strSQL);Checking Ingres' error log:
    FREEFALL: 32867             , 12f678e0]: Thu Dec  2 07:01:57 2004 E_SC0207_UNEXPECTED_ERROR    Facility returned an undocumented error.
    FREEFALL: 32867             , 12f678e0]: ULE_FORMAT: Couldn't look up message 0 (reason: ER error 10902)
    E_CL0902_ER_NOT_FOUND   No text found for message identifier
    FREEFALL: 32867             , 12f678e0]: Thu Dec  2 07:01:57 2004 E_SC0215_PSF_ERROR   Error reHowever, other prepared statements like this work fine, e.g.:
    String sqlStr = "SELECT * FROM Stock WHERE Item_Number = ?";
    PreparedStatement pstmt = con.prepareStatement(query);
    pstmt.setInt(1, 2);
    ResultSet rs = pstmt.executeQuery();Sorry if this posting is not appropriate here, but I really don't know if this has something to do with JDBC or Ingres driver itself. Note that the query runs perfectly ok when run from Ingres VisualDBA.
    Thanks,
    John.

    Your prepared statement looks like
    select first 50 date_part('year', dtrans_date) as year, ccalled_place as place, count(*) as calls, sum(nduration/60.0) as duration from phone where date_part('year', dtrans_date) = ? and cDest_type='C' group by date_part('year', dtrans_date), ccalled_place order by date_part('year', dtrans_date), calls desc
    I am not sure what this "first 50" is for?
    ***Annie***

  • Problem with Oracle Prepared Statement

    Hi all,
    Please help me..
    I Have 2 pages, in first page i had table with rows with update image for each row, when i click update it leads to 2nd page which shows the particular row information
    my problem is, i am executing prepared statement with 2 parameters in 2nd page controller which is working fine first time, when i go to first page and comes to 2nd page again my
    result set showing Null, some times query executing and getting results, some times null, i am confused with this behaviour. please help me ..
    Thanks all

    Hi ,
    How your table is being popluated ? You have executed VO in PR or PFR ?
    Please give snippet of your CO code , both after navigating from first page to second and again after coming back to first page .
    Also is same AM is retain or not ?

  • Error while accessing JSP deployed on Oracle AS

    Hi,
    I have developed an application and deployed in on the oracle AS 10.1.2
    In my application i have a Jsp on which i have the following code
    <?xml version="1.0" encoding="iso-8859-1"?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <%@ page import="javax.servlet.*"%>
    <%@ page import="javax.servlet.http.*"%>
    <%@ page import="java.io.*"%>
    <%@ page import="java.util.*"%>
    <%@ page import="java.net.*"%>
    <% String strFileName = request.getParameter("prmFileName");
    //String strFileName = "d:\\Report.xls";
    response.setContentType( "application/vnd.ms-excel; charset=ISO-8859-1");
    PrintWriter out1 = response.getWriter();
    //System.out.println(strFileName);
    FileReader fread = new FileReader (strFileName);
    BufferedReader bfd = new BufferedReader(fread);
    String inputLine;
    while ((inputLine = bfd.readLine()) != null)
    out1.println (inputLine);
    bfd.close();
    out1.close();
    %>
    When i access this jsp through the application i get this error..
    during developement i had tested this jsp by deploying it on jboss and it worked properly but now i am faced with this error
    500 Internal Server Error
    java.lang.IllegalStateException: OutputStream already retrieved     at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.EvermindHttpServletResponse.getWriter(EvermindHttpServletResponse.java:1001)     at ReportXlsOpen.jspService(_ReportXlsOpen.java:57)     [SRC:/ReportXlsOpen.jsp:12]     at com.orionserver[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)     at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:350)     at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:509)     at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:413)     at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)     at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:824)     at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:330)     at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:830)     at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.AJPRequestHandler.run(AJPRequestHandler.java:224)     at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.AJPRequestHandler.run(AJPRequestHandler.java:133)     at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)     at java.lang.Thread.run(Thread.java:534)
    Thanks & Regards,
    Madhur

    You don't need to get the output writer "out1". you can use "out" in your scriplets the same way as "request" and "response".

  • Prepared statement error

    hello friends,
    iam using the following code when i tryo to compile it gives the error as follow
    <code>
    import java.sql.*;
    import java.util.*;
    class DbDemoPrepared
    public static void main (String args[]) throws SQLException
    Class.forName("com.mysql.jdbc.Driver");
    String url="jdbc.mysql://localhost:3306";
    java.util.Properties p=new java.util.Properties();
    p.put("user","ser");
    p.put("password","heslo");
    Connection conn=DriverManager.getConnection(url,p);
    PreparedStatement ps=conn.prepareStatement("Select * from emp where empno = ? ");
    ps.setInt(1,Integer.parseInt(args[0]));
    ResultSet rs=ps.executeQuery();
    ResultSetMetaData rm= rs.getMetaData();
    int cols=rm.getColumnCount();
    System.out.println();
    for (int i=0;i<=cols;i++)
    System.out.print(rm.getColumnName(i)+"\t");
    System.out.println();
    while(rs.next())
    for (int i=1;i<=cols;i++)
    System.out.print(rs.getString(i)+"\t");
    System.out.println();
    ps.close();
    conn.close();
    </code>
    [root@server jdbc]# javac DbDemoPrepared.java
    DbDemoPrepared.java:10: unreported exception java.lang.ClassNotFoundException; must be caught or declared to be thrown
    Class.forName("com.mysql.jdbc.Driver");
    ^
    1 error
    so how to proceed
    with regards
    rama kanth

    thanks for your reply
    but the driver class has been installed successfully there becuause
    the other programs are running perfectly with the same driver.Wrong.
    if at all we need to catch that exception i tried like this
    try{
    Class.forName("com.mysql.jdbc.Driver");
    catch (SQLException e)
    System.out.println("error"+e);
    }This is Java 101. If the method in the try block throws a checked Exception X, then you have to have to have a catch block that handles it. That's what the compiler is telling you.
    but its giveng the erroe like this
    [root@server jdbc]# javac DbDemoPrepared.java
    DbDemoPrepared.java:12: exception
    java.sql.SQLException is never thrown in body of
    corresponding try statement
    catch (SQLException e)
    ^
    DbDemoPrepared.java:10: unreported exception
    java.lang.ClassNotFoundException; must be caught or
    declared to be thrown
    Class.forName("com.mysql.jdbc.Driver");
    ^
    2 errorsWhy isn't the advice the compiler is giving you good enough?
    >
    >
    >
    with regards
    rama kath
    Better go back and re-read the intro Java tutorial.

  • Prepared statement error-reply soon please

    hi,i am using a preparedstatement ,i get an error that i am not able to figure out.please help.heres the code
    i have a table called fun with two fields
    String temp="fun"; //the table name will vary so its kept a variable
    String query="insert into"+temp+"values(?,?)";
    PreparedStatement samp=prepareStatement(query);
    samp.setInt(1,2);
    samp.setString(2,"adsd");
    samp.executeQuery();
    when i execute this it gives an SQL Exception
    missing INTO keyword.
    i have also tried it with executeUpdate().it gives the same error.what could be the problem.can i give the table name dynamically in some otherway.the same method works fine for create table but errors for insert statement.how can this be corrected.bye thiyagu.

    String query="insert into"+temp+"values(?,?)";This line is wrong because you have no space after the into or before values.
    This should work...
    String query="insert into " + temp + " values(?,?)";

  • Prepared Statement error, someone plz help

    strQuery = qryProvide.supplyNotReceivedQuery();
    logObject.log("CompDataProvider","supplyNotReceivedRecords",strQuery, XMLMON_Constants.LOG_DEBUG);
    stmtRestSchema = con.prepareStatement(strQuery);
    stmtRestSchema.setString(1,loadingPoint.trim());
    stmtRestSchema.setString(2,schemaName.trim());
    stmtRestSchema.setInt(3, process);
    stmtRestSchema.setString(4,strFromDt.trim());
    rsRestSchema = stmtRestSchema.executeQuery();
    if(rsRestSchema.next()){
         String proid = rsRestSchema.getString(XMLMON_Constants.MON_LOGS_PROCESS_ID);
         int refid = rsRestSchema.getInt(XMLMON_Constants.MON_LOGS_REFID);
    } else {
         String strQry = qryProvide.supplyNotRecQuery();
         logObject.log("CompDataProvider","supplyNotReceivedRecords",strQry, XMLMON_Constants.LOG_DEBUG);
         stmtData = con.prepareStatement(strQry.toString());
         stmtData.clearParameters();
         stmtData.setString(1, loadingPoint.trim());
         stmtData.setString(2, schemaName.trim());
         stmtData.setInt(3, process);
         stmtData.setString(4,strFromDt.trim());
         /***************** Its Reaching here/
         rsData = stmtData.executeQuery(strQuery);
         /***************** Its failing here throwing exception not all variables bound/
         if(!( rsData.next() ) ){
         //     do something here
         } else{
              System.out.println("do nothing");
         rsData.close();
         stmtData.close();
    rsRestSchema.close();
    stmtRestSchema.close();
    Can anyone help me in solving the error. i have found the error where and i m not able to find why. please i need help.

    Could you print out the query, e.g. strQry, I
    think the problem lies in the Query string.

  • Oracle Prepared Statement Class Cast exception

    I am using the TxDataSource with Oracle thin driver in WL6.1
    I get a ClassCastException when I cast the PreparedStatement
    to OraclePreparedStatement.
    It is unable to cast from weblogic.jdbc.rmi.SerialPreparedStatement.
    I am not if I can use Oracle extensions with a TxDataSource
    Thanks in Advance
    Rajesh

    Don't cast to OracleResultSet but use the WebLogic API to set/get BLOBS:
    http://edocs.bea.com/wls/docs61/oracle/advanced.html#1158561

  • Prepared statement and DELETE returns 0 count

    when executing an oracle prepared statement, the count returned is allways 0 for DELETE. However, if doing an INSERT, the count returned is correct
    public void CreatePreparePurgeRcdSetArray(String sql, int i, int max, boolean create) throws SQLException,Exception
    if (create == true)
              if (preparedStatementArray == null)
                   preparedStatementArray = new PreparedStatement[max];
              int scroll_type = getScrollType();
                   if (sql.compareTo("NOT_USED") == 0)
                        preparedStatementArray[i] = null;
                   else
                        preparedStatement          = (connClass.getConn()).prepareStatement(sql);
                        preparedStatementArray[i] = preparedStatement;
                        preparedStatement          = null;
    else
         closePrepareStatementArray(max);
    public int UpdatePreparePurgeRcdSet(Vector smry, String sqlP, int i) throws SQLException,Exception
         Object[] searchs = (Object[])smry.elementAt(0);
         /*java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");
         String aaa = searchs[1].toString();
         String aab = searchs[1].toString();
         java.util.Date                     dtx = sdf.parse(aaa);
         java.util.Date                     dty = sdf.parse(aab);
         oracle.sql.DATE aa1 = new DATE(new Timestamp(dtx.getTime()));
         oracle.sql.DATE aa2 = new DATE(new Timestamp(dty.getTime()));
         java.sql.Timestamp      ts1 = (java.sql.Timestamp) searchs[1] ;
         java.sql.Timestamp      ts2 = (java.sql.Timestamp) searchs[5] ;
         boolean oracle = true;
         boolean debug = true;
              if ((oracle == true) && (debug == true))
                   String sql1 = "INSERT INTO FFI_MASTER_PURGE_TBL values ('lmill', 'OSTDEVT', 'sdsadmin', ?, 30, 60, '0', 2, 'ZZZ', ' ')";
                   String sql2 = "DELETE FROM TDSADMIN.FFI_MASTER_PURGE_TBL where FORMATCATEGORY = ?";
                   String sql3 = "DELETE from TDSADMIN.SUMMARY_TBL where (ML_STI_SRC_SYS_CD = ?) AND (ML_STI_CYCLE_CD = ?) AND (ML_STI_FILE_ID = ?)";
                   preparedStatement = (connClass.getConn()).prepareStatement(sql3);
                   //preparedStatement.setString(1, "test");
                   preparedStatement.setString(1, "618");
                   preparedStatement.setString(2, "0114200601");
                   preparedStatement.setString(3, "00001591");
                   oraclePreparedStatement = (OraclePreparedStatement)preparedStatement;
                   recsDeleted = oraclePreparedStatement.executeUpdate();
              if (oracle == true)
              preparedStatement = preparedStatementArray;
              //oraclePreparedStatement.setExecuteBatch (3);
              // ML_STI_SRC_SYS_CD
              preparedStatement.setString(1, searchs[0].toString());
                   // ML_STI_SRCSYS_DTTM
              //preparedStatement.setTimestamp(2, ts1);
              //preparedStatement.setObject(2, aa1);
              // ML_STI_CYCLE_CD
              preparedStatement.setString(2, searchs[2].toString());
                   // ML_STI_FILE_ID
              preparedStatement.setString(3, searchs[3].toString());
                   // ML_STI_LOAD_DTTM
              //preparedStatement.setTimestamp(5, ts2);
              //preparedStatement.setObject(5, aa2);
         else
                   preparedStatement = preparedStatementArray[i];
              // ML_STI_SRC_SYS_CD
              preparedStatement.setString(1, searchs[0].toString());
                   // ML_STI_SRCSYS_DTTM
              preparedStatement.setTimestamp(2, ts1);
              // ML_STI_CYCLE_CD
              preparedStatement.setString(3, searchs[2].toString());
                   // ML_STI_FILE_ID
              preparedStatement.setString(4, searchs[3].toString());
                   // ML_STI_LOAD_DTTM
              preparedStatement.setTimestamp(5, ts2);
         DateClass dateClass = new DateClass();
              String startTime = dateClass.calToFormattedDateExact();
              try
                   if (oracle == true)
                        //int batch_val = oraclePreparedStatement.getExecuteBatch();
                        oraclePreparedStatement = (OraclePreparedStatement)preparedStatement;
                        recsDeleted = oraclePreparedStatement.executeUpdate();
                        //recsDeleted = oraclePreparedStatement.sendBatch();
                   else
                        recsDeleted = preparedStatement.executeUpdate();
    catch(SQLException e)
         String err = (e.getMessage()).substring(0,e.getMessage().length()-1);
         systemClass.logSqlStatement(sqlP + " : " + err, startTime);
    throw e;
    Message was edited by:
    user539085
    Message was edited by:
    user539085
    Message was edited by:
    user539085

    user539085,
    I guess it returns 0 (zero) because it doesn't delete anything. Can you verify that it did delete some records and still returned zero?
    Good Luck,
    Avi.

  • 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

  • Error with ExecuteQuery() in prepared statement

    Hello,
    i' m a new one at java. I' m trying to build a web application in jsp and i have a problem in a simple at log in authentication.
    My code is this:
    <html>
    <head>
    <title>Welcome to the online Boat Shop, Inc.</title></head>
    <body>
    <%@ page language ="java" import = "java.io.*, java.lang.*, java.sql.*" %>
    <% try
    String strUsername = request.getParameter("USERNAME");
    String strPassword = request.getParameter("PASSWORD");
    Class.forName ("org.apache.derby.jdbc.ClientDriver");
    Connection myConn = DriverManager.getConnection("jdbc:derby://localhost:1527/boatsdb","tony", "logo");
    String strSQL = "SELECT USERNAME, PASSWORD FROM BOATDB where USERNAME = ? and PASSWORD = ?";
    PreparedStatement stmt = myConn.prepareStatement(strSQL);
    stmt.setString(1, "USERNAME");
    stmt.setString(2, "PASSWORD");
    ResultSet myResult = stmt.executeQuery(strSQL);
    if(myResult.next()){
    out.println("Login Succesful! A record with the given user name and password exists");
    } else {
    out.println("Login Failed. No records exists with the given user name and password");
    myResult.close();
    stmt.close();
    myConn.close();
    } catch(Exception e){
    out.println(e);
    %>
    </body>
    </html>
    The problem is that prepared statement doesn't support executeQuery() method and i can find any solution. The error is this:
    java.sql.SQLException: Method 'executeQuery(String)' not allowed on prepared statement. I already have some data in my database so that it can return results.
    Thank you.
    Edited by: antonis on May 3, 2008 6:13 AM

    thank you, that was the problem. It seems that i have also done mistakes in passing the username and password from the forms to the database for checking, because the message that i get always when i log is that there is no user with this username kai password.
    <form method=GET action=log1.jsp>
    <font size=5> Username <input type=text name="USERNAME" size=20>
              </font>
              <br>
              <font size=5> Password <input type=text name="PASSWORD" size=20>
              </font>
              <br>
              <input type=submit name=action value="Submit">
    </form>
    That's the forms and combined with the code in the fist post should have worked. Any ideas?
    thanks again.

  • Error handling in prepared statement batch

    Hi,
    For a prepared statement batch, it is not possible to know which operation failed. ... You should always perform a ROLLBACK operation in this situation.
    For a generic statement batch or callable statement batch, the update counts array is only a partial array containing the actual update counts up to the point of the error. ... You can either commit or roll back the successful operations in this situation, as you prefer.
    -- http://otn.oracle.com/docs/products/oracle9i/doc_library/release2/java.920/a96654/oraperf.htm#1056233
    But, I want to skip failed operations and continue to excecute the remains of the batch, also, I want to improve application performance, what should I do? Is there any choice?
    Best Regards,
    Kevin Zhao

    According to the Oracle docs these are not the only possible values:
    Oracle9i JDBC Developer's Guide and Reference
    Release 2 (9.2) chapter 12
    Performance Extensions
    "For a prepared statement batch, it is not possible to know which operation failed. The array has one element for each operation in the batch, and each element has a value of -3. According to the JDBC 2.0 specification, a value of -3 indicates that an operation did not complete successfully. In this case, it was presumably just one operation that actually failed, but because the JDBC driver does not know which operation that was, it labels all the batched operations as failures."
    It goes on to say that for a generic statement batch it is possible to know which failed. I would like to know if similar functionality will be available for prepared statement batches in the future.

Maybe you are looking for

  • UFL 'u212com.dll' that implements this function is missing

    I am attempting to write a user function library for the crystal reports version that ships with Visual Studio 2010. Following the walkthrough on the Business Objects website (although that is for VS2005) I have successfully created my .dll file and

  • HELP! Will iMovie work if I hook my iPad up to a projector to show a video?

    I have spent ages making a video for my friends birthday in iMovie on my iPad2. I had a great deal of trouble transferring it over to the PC but got there in the end. But now when I play it using QuickTime Player it's choppy and Jumpy and looks dread

  • Creating a logo

    Hello, I have read on this forum that using Indesign CS3 to create a logo is not as effective as using Illustrator. However, to purchase Illustrator and to go through a learning curve would be a significant effort on my part. Therefore as I am now fa

  • List and justified text problems

    I'm creating a PDF that uses justified text for all paragraphs and centered headers. One of the problems I'm having is that if the last sentance in a paragraph contains just a few words, it ends up far to spaced out. It ends up looking rediculous, in

  • Renaming Constraints In 8i

    I was wondering if it is possible to rename a constraint once it has been created. Without going through the process of disabling it and then cascade dropping the constraint and then recreating. I have check all my current reference material. Any hel