ORA-39039: Schema expression "IN ('TEST_REP')" contains no valid schemas.

Hi,
I am new to administration and using Datapump for the first time. My question might sound silly..
Here is my requirement.
I have 2 tables sarath9700.table1 and test_rep.table1 in the same schema. I was asked to export import data from sarath9700.table1 to test_rep.table1.
Enter user-name: sqlplus / as sysdba
Enter password:
sqlplus sys/director AS SYSDBA
Connected to:
Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
SQL> alter user sarath9700 IDENTIFIED BY sarath9700 ACCOUNT UNLOCK;
User altered.
SQL> GRANT CREATE ANY DIRECTORY TO sarath9700;
Grant succeeded.
SQL> CREATE OR REPLACE DIRECTORY test_dir AS '/u00/oracle/oradata/';
Directory created.
SQL> GRANT READ, WRITE ON DIRECTORY test_dir TO sarath9700;
Grant succeeded.
SQL> exit
$ expdp sarath9700/sarath9700 tables=table1 directory=TEST_DIR dumpfile=EMP_DEPT.dmp logfile=expdpEMP_DEPT.log
Export: Release 10.1.0.2.0 - 64bit Production on Friday, 02 April, 2010 16:16
Copyright (c) 2003, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
Starting "SARATH9700"."SYS_EXPORT_TABLE_01": sarath9700/******** tables=table1 directory=TEST_DIR dumpfile=EMP_DEPT.dmp logfile=expdpEMP_DEPT.log
Estimate in progress using BLOCKS method...
Processing object type TABLE_EXPORT/TABLE/TBL_TABLE_DATA/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 64 KB
Processing object type TABLE_EXPORT/TABLE/TABLE
Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
. . exported "SARATH9700"."TABLE1" 6.132 KB 31 rows
Master table "SARATH9700"."SYS_EXPORT_TABLE_01" successfully loaded/unloaded
Dump file set for SARATH9700.SYS_EXPORT_TABLE_01 is:
/u00/oracle/oradata/EMP_DEPT.dmp
Job "SARATH9700"."SYS_EXPORT_TABLE_01" successfully completed at 16:17
Now started doing import to the table test_rep.test26.
$ impdp test_rep/test_rep tables=test1 directory=TEST_DIR dumpfile=EMP_DEPT.dmp logfile=expdpEMP_DEPT.log
Import: Release 10.1.0.2.0 - 64bit Production on Friday, 02 April, 2010 16:40
Copyright (c) 2003, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
ORA-31655: no data or metadata objects selected for job
ORA-39039: Schema expression "IN ('TEST_REP')" contains no valid schemas.
Master table "TEST_REP"."SYS_IMPORT_TABLE_01" successfully loaded/unloaded
Starting "TEST_REP"."SYS_IMPORT_TABLE_01": test_rep/******** tables=test1 dire ctory=TEST_DIR dumpfile=EMP_DEPT.dmp logfile=expdpEMP_DEPT.log
Job "TEST_REP"."SYS_IMPORT_TABLE_01" successfully completed at 16:40
It fails with
ORA-31655: no data or metadata objects selected for job
ORA-39039: Schema expression "IN ('TEST_REP')" contains no valid schemas.
How to get rid of this.. Am I doing something wrong here??
Edited by: user2589137 on Apr 2, 2010 2:56 AM

Hi,
I missed one thing on the impdp command. It should be:
impdp test_rep/test_rep tables=sarath9700.test26 directory=TEST_DIR dumpfile=EMP_DEPT2.dmp logfile=expdpEMP_DEPT2.log remap_schema=sarath9700:test_rep CONTENT=DATA_ONLY
Actually, it looks like you exported table1, not test26. Here is your export command:
expdp sarath9700/sarath9700 tables=table1 directory=TEST_DIR dumpfile=EMP_DEPT.dmp logfile=expdpEMP_DEPT.log
The table that you exported is sarath9700.table1 as can be seen in the out put from expdp:
. . exported "SARATH9700"."TABLE1" 6.132 KB 31 rows
So, this is the table that you need to specify on the impdp command:
impdp user/password tables=sarath9700.table1 ...
You can remap the schema so the table goes into a different schema, but with 10.1, you can't rename the table.
remap_schema=old_schema:new_schema
Hope this helps.
Dean
Edited by: Dean Gagne on Apr 6, 2010 7:44 AM

Similar Messages

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

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

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

  • ORA-19007 - Schema does not match

    On my database, we have two schemas with matching tables in each - one for active data and one for data that is being held for longer-term research. Both contain an XMLType column registered to the same schema. However, when I try to insert directly from the active into the archive, I get the following:
    SQL> insert into eci_archv_schema.rev_item_earn_dtl_archv
    2 select * from eci_schema.rev_item_earn_dtl
    3 where ROWNUM = 1;
    insert into eci_archv_schema.rev_item_earn_dtl_archv
    ERROR at line 1:
    ORA-19007: Schema http://xmlns.foo.com/1.3.1/ABC.xsd does not match expected http://xmlns.foo.com/1.3.1/ABC.xsd.
    The only way in which I can successfully move the data from one to the other is to wrap the select in one of the following:
    1. XMLType.createXML(my_xml_column.getCLOBVal())
    2. XMLType.createNonSchemaBasedXML(my_xml_column)
    Both of these take an exceptionally long amount of time to complete and cause my archiving process to be very, very slow. It would appear that because the schemas were registered under different database schemas, they are somehow seen as incompatible. Is this the case or do they actually not match in some other way? Is there an easy way to compare them?
    FYI: We are running 11.2.0.3 but this also occurs on 11.2.0.2. Any help would be appreciated.

    It would appear that because the schemas were registered under different database schemas, they are somehow seen as incompatible. Possibly.
    Is this the case or do they actually not match in some other way? Is there an easy way to compare them?Are both XML schemas identical?
    If so, why not register only one globally and give access to both DB schemas?
    Does XML instances have xsi:schemaLocation or xsi:noNamespaceSchemaLocation attributes?
    Are they the same?
    A test case would be welcome actually.
    Edited by: odie_63 on 3 oct. 2012 18:50

  • Why my XML is not loading ?? (ORA-19007: Schema - does not match expected )

    Hi,
    I want to load a XML document in structured XMLType. You can run my code on your database if you have a directory object called LOG_DIR. I am on Oracle 10.1 .
    The schema is a simple example which describe a database table(like it will have 1 or more columns and 0 or more indexes). My schema looks like,
    <xs:schema elementFormDefault="qualified" attributeFormDefault="unqualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:element name="Tables" type="Table">
    <xs:annotation>
    <xs:documentation>Table defination</xs:documentation>
    </xs:annotation>
    </xs:element>
    <xs:element name="table_name" type="xs:string"/>
    <xs:complexType name="Table">
    <xs:sequence>
    <xs:element name="Column" type="Column" minOccurs="1"/>
    <xs:element name="Index" type="Index" minOccurs="0"/>
    </xs:sequence>
    </xs:complexType>
    <xs:complexType name="Column">
    <xs:annotation>
    <xs:documentation>Column of the table</xs:documentation>
    </xs:annotation>
    <xs:sequence>
    <xs:element name="Name" type="xs:string" minOccurs="1"/>
    <xs:element name="Type" type="xs:string" minOccurs="1"/>
    <xs:element name="Capacity" type="xs:decimal" minOccurs="1"/>
    </xs:sequence>
    </xs:complexType>
    <xs:complexType name="Index">
    <xs:annotation>
    <xs:documentation>Index on the table</xs:documentation>
    </xs:annotation>
    <xs:sequence>
    <xs:element name="Name" type="xs:string" minOccurs="1"/>
    <xs:element name="Type" type="xs:string" minOccurs="0"/>
    </xs:sequence>
    </xs:complexType>
    </xs:schema>
    I registered the schema,
    BEGIN
    DBMS_XMLSCHEMA.registerSchema(
    SCHEMAURL => 'tables.xsd',
    SCHEMADOC => bfilename('LOG_DIR','tables.xsd'),
    CSID => nls_charset_id('AL32UTF8')
    END;
    This was successfull, also the following create table was ok,
    CREATE TABLE TMP_XML_TABLES
    file_name VARCHAR2(2000),
    load_date DATE,
    xml_document XMLType
    XMLType COLUMN xml_document
    XMLSchema "http://xmlns.oracle.com/xdb/schemas/TDB/tables.xsd"
    ELEMENT "Tables";
    Now I have a XML document,
    <Tables xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://xmlns.oracle.com/xdb/schemas/TDB/tables.xsd">
    <table_name>trades</table_name>
    <Column><Name>trade_id</Name><Type>varchar2</Type><Capacity>50</Capacity></Column>
    <Column><Name>source</Name><Type>varchar2</Type><Capacity>100</Capacity></Column>
    <Column><Name>trade_date</Name><Type>date</Type></Column>
    <Column><Name>trader</Name><Type>varchar2</Type><Capacity>200</Capacity></Column>
    <Index><Name>trades_pk</Name><Type>btree</Type></Index>
    <Index><Name>trades_idx1</Name><Type>bitmap</Type></Index>
    </Tables>
    When I am trying to load this, I get the error,
    SQL> INSERT INTO TMP_XML_TABLES
    2 VALUES
    3 ('tables1.xml',
    4 sysdate,
    5 XMLType
    6 (
    7 bfilename('LOG_DIR','tables1.xml'),
    8 nls_charset_id('AL32UTF8')
    9 )
    10 );
    INSERT INTO TMP_XML_TABLES
    ERROR at line 1:
    ORA-19007: Schema - does not match expected tables.xsd.
    Can somebody please explain the cause ???
    Thanks and Regards

    A quick search of the forum for ORA-19007 should have allowed you to find the answer to your problem. Since you XML Schema does not declare a target namespace you need to use the xsi:noNamespaceSchemaLocation tag rather than the schemaLocation tag..
    Also please do not use URLs starting http://xmlns.oracle.com for your schemaLocation hint. If you do no own your own domain I'd suggest example.org...
    Finally please make sure that your XML Instance is valid per your XML Schema before posting. You can do this using tools like JDeveloper or XMLSpy. What should have been a 5 min repsonse took me over 20 mins to work through due to the errors in the XML Schema...
    Anyway here's a working example for you
    SQL>
    SQL>
    SQL> var schemaURL varchar2(256)
    SQL> var schemaPath varchar2(256)
    SQL> --
    SQL> begin
      2    :schemaURL := 'http://xmlns.examples.org/xdb/schemas/TDB/tables.xsd';
      3    :schemaPath := '/public/testcase.xsd';
      4  end;
      5  /
    PL/SQL procedure successfully completed.
    SQL> DROP TABLE TMP_XML_TABLES
      2  /
    Table dropped.
    SQL> call dbms_xmlSchema.deleteSchema(:schemaURL,4)
      2  /
    Call completed.
    SQL> declare
      2    res boolean;
      3    xmlSchema xmlType := xmlType(
      4  '<xs:schema elementFormDefault="qualified" attributeFormDefault="unqualified" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xdb="
    tp://xmlns.oracle.com/xdb">
      5     <xs:element name="Tables" xdb:defaultTable="TABLES_TABLE">
      6     <xs:annotation>
      7                     <xs:documentation>Table defination</xs:documentation>
      8             </xs:annotation>
      9             <xs:complexType>
    10                     <xs:complexContent>
    11                             <xs:extension base="Table"/>
    12                     </xs:complexContent>
    13             </xs:complexType>
    14     </xs:element>
    15     <xs:complexType name="Table">
    16             <xs:sequence>
    17                     <xs:element name="table_name" type="xs:string"/>
    18                     <xs:element name="Column" type="Column" maxOccurs="unbounded"/>
    19                     <xs:element name="Index" type="Index" minOccurs="0" maxOccurs="unbounded"/>
    20             </xs:sequence>
    21     </xs:complexType>
    22     <xs:complexType name="Column">
    23             <xs:annotation>
    24                     <xs:documentation>Column of the table</xs:documentation>
    25             </xs:annotation>
    26             <xs:sequence>
    27                     <xs:element name="Name" type="xs:string"/>
    28                     <xs:element name="Type" type="xs:string"/>
    29                     <xs:element name="Capacity" type="xs:decimal"/>
    30             </xs:sequence>
    31     </xs:complexType>
    32     <xs:complexType name="Index">
    33             <xs:annotation>
    34                     <xs:documentation>Index on the table</xs:documentation>
    35             </xs:annotation>
    36             <xs:sequence>
    37                     <xs:element name="Name" type="xs:string"/>
    38                     <xs:element name="Type" type="xs:string" minOccurs="0"/>
    39             </xs:sequence>
    40     </xs:complexType>
    41  </xs:schema>
    42  ');
    43  begin
    44    if (dbms_xdb.existsResource(:schemaPath)) then
    45      dbms_xdb.deleteResource(:schemaPath);
    46    end if;
    47    res := dbms_xdb.createResource(:schemaPath,xmlSchema);
    48  end;
    49  /
    PL/SQL procedure successfully completed.
    SQL> begin
      2    dbms_xmlschema.registerSchema
      3    (
      4      :schemaURL,
      5      xdbURIType(:schemaPath).getClob(),
      6      TRUE,TRUE,FALSE,TRUE
      7    );
      8  end;
      9  /
    PL/SQL procedure successfully completed.
    SQL> CREATE TABLE TMP_XML_TABLES
      2  (
      3  file_name VARCHAR2(2000),
      4  load_date DATE,
      5  xml_document XMLType
      6  )
      7  XMLType COLUMN xml_document
      8  XMLSchema "http://xmlns.examples.org/xdb/schemas/TDB/tables.xsd"
      9  ELEMENT "Tables"
    10  /
    Table created.
    SQL> insert into TMP_XML_TABLES values ('testcase1.xml',sysdate,xmltype(
      2  '<Tables xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://xmlns.examples.org/xdb/schemas/T
    /tables.xsd">
      3     <table_name>trades</table_name>
      4     <Column>
      5             <Name>trade_id</Name>
      6             <Type>varchar2</Type>
      7             <Capacity>50</Capacity>
      8     </Column>
      9     <Column>
    10             <Name>source</Name>
    11             <Type>varchar2</Type>
    12             <Capacity>100</Capacity>
    13     </Column>
    14     <Column>
    15             <Name>trade_date</Name>
    16             <Type>date</Type>
    17     </Column>
    18     <Column>
    19             <Name>trader</Name>
    20             <Type>varchar2</Type>
    21             <Capacity>200</Capacity>
    22     </Column>
    23     <Index>
    24             <Name>trades_pk</Name>
    25             <Type>btree</Type>
    26     </Index>
    27     <Index>
    28             <Name>trades_idx1</Name>
    29             <Type>bitmap</Type>
    30     </Index>
    31  </Tables>'))
    32  /
    1 row created.
    SQL> set long 10000 pages 0 lines 160
    SQL> /
    1 row created.
    SQL> select * from TMP_XML_TABLES
      2  /
    testcase1.xml
    21-APR-06
    <Tables xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://xmlns.examples.org/xdb/schemas/TDB/tab
    s.xsd">
      <table_name>trades</table_name>
      <Column>
        <Name>trade_id</Name>
        <Type>varchar2</Type>
        <Capacity>50</Capacity>
      </Column>
      <Column>
        <Name>source</Name>
        <Type>varchar2</Type>
        <Capacity>100</Capacity>
      </Column>
      <Column>
        <Name>trade_date</Name>
        <Type>date</Type>
      </Column>
      <Column>
        <Name>trader</Name>
        <Type>varchar2</Type>
        <Capacity>200</Capacity>
      </Column>
      <Index>
        <Name>trades_pk</Name>
        <Type>btree</Type>
      </Index>
      <Index>
        <Name>trades_idx1</Name>
        <Type>bitmap</Type>
      </Index>
    </Tables>
    testcase1.xml
    21-APR-06
    <Tables xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://xmlns.examples.org/xdb/schemas/TDB/tab
    s.xsd">
      <table_name>trades</table_name>
      <Column>
        <Name>trade_id</Name>
        <Type>varchar2</Type>
        <Capacity>50</Capacity>
      </Column>
      <Column>
        <Name>source</Name>
        <Type>varchar2</Type>
        <Capacity>100</Capacity>
      </Column>
      <Column>
        <Name>trade_date</Name>
        <Type>date</Type>
      </Column>
      <Column>
        <Name>trader</Name>
        <Type>varchar2</Type>
        <Capacity>200</Capacity>
      </Column>
      <Index>
        <Name>trades_pk</Name>
        <Type>btree</Type>
      </Index>
      <Index>
        <Name>trades_idx1</Name>
        <Type>bitmap</Type>
      </Index>
    </Tables>Since you are tracking metadata about the documents (name, date loaded) you might want to consider using the XDB repository to load the documents. The folllowing shows how you can do this from SQL and then create a view which contains the metadata and document content. The advantage of this approach is you can now load the documents using FTP or WebDAV.
    SQL> declare
      2    res boolean;
      3    document xmltype := xmltype(
      4  '<Tables xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://xmlns.examples.org/xdb/schemas/T
    /tables.xsd">
      5     <table_name>trades</table_name>
      6     <Column>
      7             <Name>trade_id</Name>
      8             <Type>varchar2</Type>
      9             <Capacity>50</Capacity>
    10     </Column>
    11     <Column>
    12             <Name>source</Name>
    13             <Type>varchar2</Type>
    14             <Capacity>100</Capacity>
    15     </Column>
    16     <Column>
    17             <Name>trade_date</Name>
    18             <Type>date</Type>
    19     </Column>
    20     <Column>
    21             <Name>trader</Name>
    22             <Type>varchar2</Type>
    23             <Capacity>200</Capacity>
    24     </Column>
    25     <Index>
    26             <Name>trades_pk</Name>
    27             <Type>btree</Type>
    28     </Index>
    29     <Index>
    30             <Name>trades_idx1</Name>
    31             <Type>bitmap</Type>
    32     </Index>
    33  </Tables>');
    34  begin
    35    res := dbms_xdb.createResource('/public/testcase.xml',document);
    36  end;
    37  /
    PL/SQL procedure successfully completed.
    SQL> create or replace view TMP_XML_TABLES_VIEW as
      2  select extractValue(res,'/Resource/DisplayName') FILENAME,
      3         extractValue(res,'/Resource/CreationDate') LOAD_DATE,
      4         object_value XML_DOCUMENT
      5    from RESOURCE_VIEW, TABLES_TABLE t
      6   where extractValue(res,'/Resource/XMLRef')= ref(t)
      7  /
    View created.
    SQL> select * from TABLES_TABLE
      2  /
    <Tables xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://xmlns.examples.org/xdb/schemas/TDB/tab
    s.xsd">
      <table_name>trades</table_name>
      <Column>
        <Name>trade_id</Name>
        <Type>varchar2</Type>
        <Capacity>50</Capacity>
      </Column>
      <Column>
        <Name>source</Name>
        <Type>varchar2</Type>
        <Capacity>100</Capacity>
      </Column>
      <Column>
        <Name>trade_date</Name>
        <Type>date</Type>
      </Column>
      <Column>
        <Name>trader</Name>
        <Type>varchar2</Type>
        <Capacity>200</Capacity>
      </Column>
      <Index>
        <Name>trades_pk</Name>
        <Type>btree</Type>
      </Index>
      <Index>
        <Name>trades_idx1</Name>
        <Type>bitmap</Type>
      </Index>
    </Tables>
    SQL> select * from TMP_XML_TABLES_VIEW
      2  /
    testcase.xml
    21-APR-06 02.21.37.031000 PM
    <Tables xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://xmlns.examples.org/xdb/schemas/TDB/tab
    s.xsd">
      <table_name>trades</table_name>
      <Column>
        <Name>trade_id</Name>
        <Type>varchar2</Type>
        <Capacity>50</Capacity>
      </Column>
      <Column>
        <Name>source</Name>
        <Type>varchar2</Type>
        <Capacity>100</Capacity>
      </Column>
      <Column>
        <Name>trade_date</Name>
        <Type>date</Type>
      </Column>
      <Column>
        <Name>trader</Name>
        <Type>varchar2</Type>
        <Capacity>200</Capacity>
      </Column>
      <Index>
        <Name>trades_pk</Name>
        <Type>btree</Type>
      </Index>
      <Index>
        <Name>trades_idx1</Name>
        <Type>bitmap</Type>
      </Index>
    </Tables>
    SQL>
    SQL>
    SQL>

  • Received ORA-22818 subquery expressions not allowed here when creating mate

    Hello,
    I was trying to create a materialized view to describe the referential integrity between the tables in my schema:
    create materialized view user_references
    tablespace tbspc
    build immediate
    using index
    refresh complete on demand next sysdate + 1
    as
    select uic.table_name to_table, uic.column_name to_column,
    ucc.table_name from_table, ucc.column_name from_column
    from user_ind_columns uic, user_constraints uc, user_cons_columns ucc
    where uic.index_name = uc.r_constraint_name
    and uc.constraint_name = ucc.constraint_name
    and uc.owner=upper('my_schema');
    I was able to create this MV in Oracle 9.2. It failed with the following error when I ran it against Oracle 10.1:
    from user_ind_columns uic, user_constraints uc, user_cons_columns ucc
    ERROR at line 9:
    ORA-22818: subquery expressions not allowed here
    Is not allowing subqueries in MV a new restriction in Oracle 10? Is there a workaround?
    Thanks

    Hello
    This may be a bug in your version as I can do it successfully on 10.2
    tylerd@DEV2> create materialized view user_references
      2  build immediate
      3  using index
      4  refresh complete on demand next sysdate + 1
      5  as
      6  select uic.table_name to_table, uic.column_name to_column,
      7  ucc.table_name from_table, ucc.column_name from_column
      8  from user_ind_columns uic, user_constraints uc, user_cons_columns ucc
      9  where uic.index_name = uc.r_constraint_name
    10  and uc.constraint_name = ucc.constraint_name
    11  and uc.owner=upper('my_schema');
    Materialized view created.
    tylerd@DEV2> select * from v$version
      2  /
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Prod
    PL/SQL Release 10.2.0.2.0 - Production
    CORE    10.2.0.2.0      Production
    TNS for 32-bit Windows: Version 10.2.0.2.0 - Production
    NLSRTL Version 10.2.0.2.0 - Production
    5 rows selected.HTH
    David

  • PL/SQL ORA-00936 missing expression

    Hello all,
    I'm having an issues and need help with this script... Please help, thanks.
    error:
    ====
    31 32 /
    AST_UPDATED_BY,LAST_UPDATE_LOGIN) values(i,'ERROR_LOG_ID'||i, 'PROCEDURE_NAME'||i||, 'REQUEST_ID' |i||, 'PROCESS_NAME' ||i||, 'ERROR_TYPE'|i|, 'MESSAGE_DETAILS' ||i||, 'ERROR_TIMESTAMP' |i|, 'STATUS' ||i||, 'CREATED_BY' ||i||, 'CREATION_DATE' ||i||, "to_char(last_update_date, 'dd-Mon-yyyy hh:mi:ss')" |i|, 'LAST_UPDATED_BY' ||i||, 'LAST_UPDATE_LOGIN');
    ERROR at line 28:
    ORA-06550: line 28, column 84:
    PL/SQL: ORA-00936: missing expression
    ORA-06550: line 27, column 1:
    PL/SQL: SQL Statement ignored
    script.
    ====
    declare
    CURSOR c_iostats IS
    SELECT * from XXFRO.XXFRO_ERRORS;
    ERROR_LOG_ID NUMBER;
    PROCESS_NAME VARCHAR2(50);
    ERROR_TYPE VARCHAR2(20);
    STATUS VARCHAR2(20);
    MESSAGE_DETAILS VARCHAR2(2000);
    ERROR_LOG_ID NUMBER;
    PROCEDURE_NAME VARCHAR2(50);
    REQUEST_ID NUMBER;
    PROCESS_NAME VARCHAR2(50);
    ERROR_TYPE VARCHAR2(20);
    MESSAGE_DETAILS VARCHAR2(2000);
    ERROR_TIMESTAMP DATE;
    STATUS VARCHAR2(20);
    CREATED_BY NUMBER;
    CREATION_DATE DATE;
    LAST_UPDATE_DATE DATE;
    LAST_UPDATED_BY NUMBER;
    LAST_UPDATE_LOGIN NUMBER;
    Begin
    for i in 1..1000000 LOOP
    insert into IO_TEST(ERROR_LOG_ID
    ,PROCEDURE_NAME
    ,REQUEST_ID
    ,PROCESS_NAME
    ,ERROR_TYPE
    ,MESSAGE_DETAILS
    ,ERROR_TIMESTAMP
    ,STATUS,CREATED_BY
    ,CREATION_DATE
    ,LAST_UPDATE_DATE
    ,LAST_UPDATED_BY
    ,LAST_UPDATE_LOGIN)
    values(i,'ERROR_LOG_ID'||i, 'PROCEDURE_NAME'||i||, 'REQUEST_ID' |i||, 'PROCESS_NAME' ||i||, 'ERROR_TYPE'|i|, 'MESSAGE_DETAILS' ||i||, 'ERROR_TIMESTAMP' |i|, 'STATUS' ||i||, 'CREATED_BY' ||i||, 'CREATION_DATE' ||i||,'LAST_UPDATE_DATE' ||i||, 'LAST_UPDATED_BY' ||i||, 'LAST_UPDATE_LOGIN');
    END LOOP;
    end;
    Thanks,
    HCDBA

    Hi,
    Why are you using the concat(||) Symbol after i in the expression String 'CREATED_BY' ||i||. When you are padding between
    two text we use so.
    Ex: If you want to concat 'i' between String we use
    DBMS_OUTPUT.PUT_LINE('Five is between '|| i || 'and Six');The Insert Statement should be re-written as
    INSERT INTO io_test
                (error_log_id, procedure_name, request_id,
                 process_name, ERROR_TYPE, message_details,
                 error_timestamp, status, created_by,
                 creation_date, last_update_date,
                 last_updated_by, last_update_login
         VALUES (i, 'ERROR_LOG_ID' || i, 'PROCEDURE_NAME' || i,
                  'REQUEST_ID' || i, 'PROCESS_NAME' || i, 'ERROR_TYPE' || i,
                  'MESSAGE_DETAILS'
                  || i, 'ERROR_TIMESTAMP' || i, 'STATUS' || i,
                  'CREATED_BY' || i, 'CREATION_DATE' || i,
                  'LAST_UPDATE_DATE' || i, 'LAST_UPDATED_BY' || i,
                 'LAST_UPDATE_LOGIN'
                );Thanks,
    Shankar

  • 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

  • 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 while loading Flat file to the table (ORA-00936: missing expression)

    lat file Hi Gurus
    Receiving the following error while trying to load of flat file to the database :
    ODI-1228: Task test_file_load (Integration) fails on the target ORACLE connection DEMO_STAGE.
    Caused By: java.sql.SQLSyntaxErrorException: ORA-00936: missing expression
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:457)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:405)
         at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:889)
         at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:476)
         at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:204)
         at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:540)
         at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:217)
         at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:1079)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1466)
         at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3752)
         at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3937)
         at oracle.jdbc.driver.OraclePreparedStatementWrapper.execute(OraclePreparedStatementWrapper.java:1535)
         at oracle.odi.runtime.agent.execution.sql.SQLCommand.execute(SQLCommand.java:163)
         at oracle.odi.runtime.agent.execution.sql.SQLExecutor.execute(SQLExecutor.java:102)
         at oracle.odi.runtime.agent.execution.sql.SQLExecutor.execute(SQLExecutor.java:1)
         at oracle.odi.runtime.agent.execution.TaskExecutionHandler.handleTask(TaskExecutionHandler.java:50)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.processTask(SnpSessTaskSql.java:2906)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java:2609)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatAttachedTasks(SnpSessStep.java:537)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java:453)
         at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:1740)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$2.doAction(StartSessRequestProcessor.java:338)
         at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:214)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.doProcessStartSessTask(StartSessRequestProcessor.java:272)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.access$0(StartSessRequestProcessor.java:263)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$StartSessTask.doExecute(StartSessRequestProcessor.java:822)
         at oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:123)
         at oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor$2.run(DefaultAgentTaskExecutor.java:82)
         at java.lang.Thread.run(Thread.java:662)
    The file which I have tried to load is : SRC_SALES_PERSON and teh table structure is
    CREATE table "TRG_SALES_PERSON"(
    "SALES_PERSON_ID" NUMBER(8,0) NOT NULL,
    "FIRST_NAME" VARCHAR2(80),
    "LAST_NAME" VARCHAR2(80),
    "DATE_HIRED" VARCHAR2(80),
    "DATE_UPDATED" DATE NOT NULL)
    Knowledge module used are
    LKM File to SQL
    IKM SQL Incremental Update
    We rae using ODI 11g R2 ...
    Thanks and reallty appreciate any help in thsi regard.

    HI there,
    I am facing the same issue while loading data from SRC_SALES_PERSON(flat file) to TRG_CUSTOMER.
    I dont see any errors in the steps however the data is not laoded finally. Here are the sql commands
    **On source**
    select     ID     C11_ID,
         LASTNAME     C9_LASTNAME
    from      TABLE
    /*$$SNPS_START_KEYSNP$CRDWG_TABLESNP$CRTABLE_NAME=SRC_SALES_PERSONSNP$CRLOAD_FILE=D:\Pratima\Softwares\ODI\ofm_odi_companion_generic_11.1.1.5.1_disk1_1of1[1]\demo\oracledi-demo\oracledi\demo\file/SRC_SALES_PERSON.txtSNP$CRFILE_FORMAT=FSNP$CRFILE_SEP_FIELD=0x0009SNP$CRFILE_SEP_LINE=0x000D0x000ASNP$CRFILE_FIRST_ROW=0SNP$CRFILE_ENC_FIELD=SNP$CRFILE_DEC_SEP=SNP$CRSNP$CRDWG_COLSNP$CRCOL_NAME=IDSNP$CRTYPE_NAME=STRINGSNP$CRORDER=1SNP$CRLINE_OFFSET=1SNP$CRLENGTH=11SNP$CRPRECISION=11SNP$CRACTION_ON_ERROR=0SNP$CRSNP$CRDWG_COLSNP$CRCOL_NAME=FIRSTNAMESNP$CRTYPE_NAME=STRINGSNP$CRLINE_OFFSET=12SNP$CRLENGTH=50SNP$CRPRECISION=50SNP$CRSNP$CRDWG_COLSNP$CRCOL_NAME=LASTNAMESNP$CRTYPE_NAME=STRINGSNP$CRLINE_OFFSET=62SNP$CRLENGTH=50SNP$CRPRECISION=50SNP$CRSNP$CRDWG_COLSNP$CRCOL_NAME=DATE1SNP$CRTYPE_NAME=STRINGSNP$CRLINE_OFFSET=112SNP$CRLENGTH=20SNP$CRPRECISION=20SNP$CR$$SNPS_END_KEY*/
    On Target
    insert into STAGING.C$_0TRG_CUSTOMER
         C11_ID,
         C9_LASTNAME
    values
         :C11_ID,
         :C9_LASTNAME
    The actual code at source fails however the step is in green.
    Thanks in Advance,
    Pratima

  • ORA-00339: archived log does not contain any redo

    Hi All,
    recently we faced 'ORA-00339: archived log does not contain any redo' issue at standby side,
    after searching on Google and from Metalink (note 30866.1 and 7197445.8 ) I find out that this is the known issue for 10g and below versions, our's is 11.2.0.3,
    Error in Alert Log :
    Errors in file /oracle/ora_home/diag/diag/rdbms/dwprd/DWPRD/trace/DWPRD_pr0a_48412.trc:
    ORA-00339: archived log does not contain any redo
    ORA-00334: archived log: '/redolog2/redo/redolog3a.log'
    Errors in file /oracle/ora_home/diag/diag/rdbms/dwprd/DWPRD/trace/DWPRD_pr0a_48412.trc (incident=190009):
    ORA-00600: internal error code, arguments: [kdBlkCheckError], [1], [56702], [6114], [], [], [], [], [], [], [], []
    Incident details in: /oracle/ora_home/diag/diag/rdbms/dwprd/DWPRD/incident/incdir_190009/DWPRD_pr0a_48412_i190009.trc
    Use ADRCI or Support Workbench to package the incident.
    See Note 411.1 at My Oracle Support for error and packaging details.
    Slave exiting with ORA-10562 exception
    Errors in file /oracle/ora_home/diag/diag/rdbms/dwprd/DWPRD/trace/DWPRD_pr0a_48412.trc:
    ORA-10562: Error occurred while applying redo to data block (file# 1, block# 56702)
    ORA-10564: tablespace SYSTEM
    ORA-01110: data file 1: '/oradata1/database/DATAFILES/system01.dbf'
    ORA-10561: block type 'TRANSACTION MANAGED DATA BLOCK', data object# 2
    ORA-00600: internal error code, arguments: [kdBlkCheckError], [1], [56702], [6114], [], [], [], [], [], [], [], []
    Mon Apr 15 11:34:12 2013
    Dumping diagnostic data in directory=[cdmp_20130415113412], requested by (instance=1, osid=48412 (PR0A)), summary=[incident=190009].
    Thanks

    Hi,
    "The archived log is not the correct log.
    It is a copy of a log file that has never been used for redo generation, or was an online log being prepared to be the current log."
    "Restore the correct log file."
    Can you say, what is last changes on your database, On log files?
    Did you copies your '/redolog2/redo/redolog3a.log' log file from other ?
    Regards
    Mahir M. Quluzade

  • ORA-00936: Missing Expression when using a claculation as a condition item

    Hi
    I created a calculation below to create a subtotal on each row of a group of selected items.
    SUM(Invoice Amount)OVER(PARTITION BY Supplier Num ORDER BY Payment Currency Code)
    This worked fine - but then I wanted to create a condition based on this calculation and when I used the calculation as a condition item and reran the report I received the 'ORA-00936: Missing Expression' error. So not too sure why it is fine as a calculation but not as part of a condition.
    We use Discoverer version 4.1
    Am I missing something or is this a bug?
    Any help would be very appreciated
    Thanks
    Marcus

    Thanks for your reply, Rod
    We are using the 9.2.0.5 version of the database
    I am not a SQL expert, by any means, but below is the line that refers to the condition in the sql inspector
    WHERE ( ( E_152 )/2 > 50)
    presuambly that means E_152 is the calculation, I think this may be refering to this at the beginning of the report:
    SELECT DISTINCT E316344 as E316344,E316372 as E316372,E316411 as E316411,E316425 as E316425,E316496 as E316496,E316497 as E316497,E316498 as E316498,E316510 as E316510,E316511 as E316511,E316512 as E316512,E316515 as E316515,E316517 as E316517,E316519 as E316519,E316520 as E316520,E_24 as E_24,E_21 as E_21,E_18 as E_18,E_16 as E_16,E_13 as E_13,E_11 as E_11,E316501 as E316501 FROM ( SELECT E_152 as E_152,DISTINCT E316344 as E316344,E316372 as E316372,E316411 as E316411,E316425 as E316425,E316496 as E316496,E316497 as E316497,E316498 as E316498,E316510 as E316510,E316511 as E316511,E316512 as E316512,E316515 as E316515,E316517 as E316517,E316519 as E316519,E316520 as E316520,E_24 as E_24,E_21 as E_21,E_18 as E_18,E_16 as E_16,E_13 as E_13,E_11 as E_11,E316501 as E316501 FROM ( SELECT DISTINCT i316344 as E316344,i316372 as E316372,i316411 as E316411,i316425 as E316425,i316496 as E316496,i316497 as E316497,i316498 as E316498,i316510 as E316510,i316511 as E316511,i316512 as E316512,i316515 as E316515,i316517 as E316517,i316519 as E316519,i316520 as E316520,SUM(i316501) OVER(PARTITION BY i316345 ORDER BY i316520 )/2 as E_24,( i316501-( NVL(i316502,0) ) )*( NVL(i316522,1) ) as E_21,i316501-( NVL(i316502,0) ) as E_18,NVL(i316502,0) as E_16,i316501*( NVL(i316522,1) ) as E_13,NVL(i316522,1) as E_11,i316501 as E316501,SUM(i316501) OVER(PARTITION BY i316345 ORDER BY i316520 ) as E_152
    Apologies if this info is not that helpful
    Would it have anything to do with the fact that the row calculation is based on several rows (i.e. a subtotal) and if a single row is excluded it would change the value of the other rows within that subtotal group. Maybe it causes some sort of circular issue?
    Anyway, thanks again for your help - hopefully we can resolve it
    Marcus

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

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

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

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

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

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

  • ORA-00936: missing expression in HTMLDB

    Hello,
    I have created a report based on a table
    Initially this page comes up fine
    When I do "Insert another record" and come back to this report page using "back" button, I get the message
    failed to parse SQL query:
    ORA-00936: missing expression
    Clicking the Reset button displays the page as expected
    Is there any way by which I can reset the report page each time before redering
    So that the end-user doesnt have to click the Reset button
    I dont see any SQL error in this as "Reset" brings things to normal
    Please let me know the way to get rid of this unpleasant message
    Thanks

    Since you have not posted the output from "show errors;", my initial guess about the error would be for the "date" variable that you have declared. Try renaming that column to say date1.

  • ORA-00936: missing expression , in a stored procedure..

    PL/SQL: ORA-00936: missing expression is the error i get when i compile my following procedure .
    create or replace procedure "UPDATE_LOG"
    (sub IN NUMBER,
    recv IN NUMBER,
    transIN VARCHAR2,
    type IN VARCHAR2,
    date IN TIMESTAMP,
    delivery IN VARCHAR2,
    amt IN NUMBER,
    grp IN VARCHAR2)
    is
    BEGIN
    INSERT INTO detail_log values(sub,recv,trans,type,date,delivery,amt,grp) ;
    END UPDATE_LOG;
    I tried many alternatives, what is wrong with it ..
    The select procedures are working fine..

    Since you have not posted the output from "show errors;", my initial guess about the error would be for the "date" variable that you have declared. Try renaming that column to say date1.

Maybe you are looking for

  • Android Kitkat 4.4.2 Update Kills Visual Voicemail

    I updated my Note 3 to KitKat 4.4.2 using Kies3 software.  It works great, but visual voice mail is now DOA & impossible to use!  This has GOT TO BE FIXED!  I see that a few others are having the same problem.  I called Verizon tech Support about it

  • Problems with install 710 Patch level 15

    Hi, i have installed patchlevel 15 of GUI 710. Istallation was OK. When i check the Installation, with tweak SAP GUI i get two error: File not found: C:\Programme\Java\jre6\lib\ext\VERSION.ini and File not found: C:\Programme\Java\jre6\lib\ext\VCTK.i

  • Standard OM infotype 1240

    Hi everyone: I have come across a rather odd situation in Org Management. Up until now, I was under the impression that all standard SAP infotypes were, like infotypes 1000 (Object) & 1001 (Relationships), comprised of many components (see attached I

  • Transfer a photo from Macbook running Mavericks to iOS8 iphone

    I've upgraded my iPhone 5S to iOS8 without realising that iPhoto is no longer supported from my MacbookAir running Mavericks. Had I know I would have delayed the upgrade. Today I found out that I can't sync any of my iPhoto albums to my iPhone. This

  • Cloud package for Photoshop and Lightroom

    If I purchase the cloud package for Photoshop and Lightroom . Will I be able to continue using my previous version of Lightroom on the same computer?  I would like to have access to both the my previous one and new cloud Lightroom on one computer.  W