Error in CMP ORA-00928: missing SELECT keyword

Hi,
I am using WLS 8.1 and with CMP trying to insert records in oracle 8.1.
But I am getting error as below.
I hv not defined and finder method in the home interface except the default findByPrimaryKey().
javax.transaction.TransactionRolledbackException: EJB Exception: : java.sql.SQLE
xception: ORA-00928: missing SELECT keyword
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:579)
at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1894)
at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:109
4)
at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.ja
va:2132)
at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.jav
a:2015)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStateme
nt.java:2877)
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePrepar
edStatement.java:608)
at weblogic.jdbc.wrapper.PreparedStatement.executeUpdate(PreparedStateme
nt.java:95)
at weblogic.ejb20.manager.BaseEntityManager.executeInsertStmt(BaseEntity
Manager.java:546)
at weblogic.ejb20.manager.BaseEntityManager.executeDBOperations(BaseEnti
tyManager.java:435)
at weblogic.ejb20.internal.TxManager$TxListener.executeDBOperations(TxMa
nager.java:596)
at weblogic.ejb20.internal.TxManager$TxListener.executeDBOperationsDrive
r(TxManager.java:571)
at weblogic.ejb20.internal.TxManager$TxListener.beforeCompletion(TxManag
er.java:731)
at weblogic.transaction.internal.ServerSCInfo.callBeforeCompletions(Serv
erSCInfo.java:1010)
at weblogic.transaction.internal.ServerSCInfo.startPrePrepareAndChain(Se
rverSCInfo.java:115)
at weblogic.transaction.internal.ServerTransactionImpl.localPrePrepareAn
dChain(ServerTransactionImpl.java:1142)
at weblogic.transaction.internal.ServerTransactionImpl.globalPrePrepare(
ServerTransactionImpl.java:1868)
at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(Se
rverTransactionImpl.java:250)
at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTran
sactionImpl.java:221)
at weblogic.ejb20.internal.BaseEJBHome.postHomeInvoke(BaseEJBHome.java:3
93)
at weblogic.ejb20.internal.EntityEJBHome.create(EntityEJBHome.java:268)
at gateway.GatewayUpdate_f6dwyt_HomeImpl.create(GatewayUpdate_f6dwyt_Hom
eImpl.java:84)
at gateway.LogBean.msg_update(LogBean.java:137)
at gateway.LogBean.onMessage(LogBean.java:57)
at weblogic.ejb20.internal.MDListener.execute(MDListener.java:382)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
In a nushell I am not using any finder methods in my client program.Still I am
getting this error.
Pl.advise.
Regards,
Ram

Hi,
Please do not post the same question in multiple newsgroups.
Please see my reply in the other group.
thanks

Similar Messages

  • Error ORA-00928: missing SELECT keyword

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

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

  • Sqlldr: ORA-00928: missing SELECT keyword

    Hi,
    I am not able to make sqlldr work using very simple control file. Any hints appreciated
    P..
    <pre>
    -bash-3.2$ cat /export/oracle/a.ctl
    LOAD DATA
    INTO TABLE utf8
    fields terminated by ","
    (char, x)
    -bash-3.2$ cat /export/oracle/data.txt
    a,b
    c,d
    -bash-3.2$ bin/sqlldr sysman/11amcoke control=/export/oracle/a.ctl data=/export/oracle/data.txt log=import
    SQL*Loader: Release 11.2.0.1.0 - Production on Tue Oct 11 01:02:26 2011
    Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
    Commit point reached - logical record count 2
    -bash-3.2$ cat import.log
    SQL*Loader: Release 11.2.0.1.0 - Production on Tue Oct 11 01:02:26 2011
    Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
    Control File: /export/oracle/a.ctl
    Data File: /export/oracle/data.txt
    Bad File: /export/oracle/data.bad
    Discard File: none specified
    (Allow all discards)
    Number to load: ALL
    Number to skip: 0
    Errors allowed: 50
    Bind array: 64 rows, maximum of 256000 bytes
    Continuation: none specified
    Path used: Conventional
    Table UTF8, loaded from every logical record.
    Insert option in effect for this table: INSERT
    Column Name Position Len Term Encl Datatype
    CHAR FIRST * , CHARACTER
    X NEXT * , CHARACTER
    Record 1: Rejected - Error on table UTF8, column CHAR.
    ORA-00928: missing SELECT keyword
    Record 2: Rejected - Error on table UTF8, column CHAR.
    ORA-00928: missing SELECT keyword
    Table UTF8:
    0 Rows successfully loaded.
    2 Rows not loaded due to data errors.
    0 Rows not loaded because all WHEN clauses were failed.
    0 Rows not loaded because all fields were null.
    Space allocated for bind array: 33024 bytes(64 rows)
    Read buffer bytes: 1048576
    Total logical records skipped: 0
    Total logical records read: 2
    Total logical records rejected: 2
    Total logical records discarded: 0
    Run began on Tue Oct 11 01:02:26 2011
    Run ended on Tue Oct 11 01:02:26 2011
    Elapsed time was: 00:00:00.12
    CPU time was: 00:00:00.04
    </pre>
    Should it matter, this is on Solaris 10u10, amd64 (VirtualBox) with 8GB RAM
    Edited by: user13277775 on 10.10.2011 16:10

    Don't use reserved words (CHAR,which is a format specification) as column names:
    http://download.oracle.com/docs/cd/E11882_01/server.112/e22490/ldr_field_list.htm#i1015797

  • "ORA-00928: missing SELECT keyword" only on one instance in RAC

    I am using oracle 9i RAC.When I run a query in one instance it is working fine but in another instance of RAC it is giving "ORA-00928: missing SELECT keyword".
    I am wondering why it happening in the same RAC.Please suggest me where is the problem.
    Thanks

    STAR_TRANSFORMATION_ENABLED=true in both instances
    My query lools like
    SELECT * FROM
         (SELECT coulmn1,col2
                   FROM tab1 wh full OUTER JOIN tab2 stg on wh.row_id = stg.row_id
                   WHERE wh.MODIFICATION_NUM IS NULL
                   OR stg.MODIFICATION_NUM IS NULL
                        OR wh.MODIFICATION_NUM <> stg.MODIFICATION_NUM) WHERE REC_STA <>'D';
    Please suggest
    Thanks

  • Invalid exists/not exists condition: ORA-00928: missing SELECT keyword

    I am getting errors when I edit the source region and add the sql I want to run in the report. If I run the following query in sqlplus with the schema owner substituted for OWNER it works fine.
    SELECT TK_IN_TIME
    from "#OWNER#"."TIME_KEEPING_T"
    I also run the following code in sqlplus and it works perfect, but from the source region I get a divide by 0 error.
    select dt,to_char(trunc(mod((elaps)*24,24)),'fm00')||':'||
    to_char(trunc(mod((elaps)*24*60,60)),'fm00')||':'||
    to_char(trunc(mod((elaps)*24*60*60,60)),'fm00') ELAPSED
    from
    select trunc (tk_in_time) dt, sum(tk_out_time-tk_in_time) elaps
    from time_keeping_t
    group by trunc(tk_in_time)
    order by dt
    What is so different between the source region and sqlplus. I need to have this query run in my report and unfortunately, it doesn't seem possible. I'm about to give up on APEX and try something different.

    I couldn't paste a screenshot, so I cut and paste. If there is somewhere I could put the screenshot let me know. There is IDENTIFICATION, USER INTERFACE, and SOURCE. I'm putting the sql into the SOURCE region. I've gotten so many errors, that I have it just limited to a simple select of two fields, and I apply changes and then RUN, and get the 00928 error.
    Region Definition Report Attributes Print Attributes
    Region: 2 of 2 Name: Report on TIME_KEEPING_T
    Show All Identification User Interface Source Conditions Cache Header and Footer Authorization Customization Configuration Comments
    Identification
    Page: 3 Report on TIME_KEEPING_T
    Title exclude title from translation
    Type SQL Query SQL Query (PL/SQL function body returning SQL query)
    Static ID
    Region Attributes
    User Interface
    Template No Template Borderless Region Bracketed Region Breadcrumb Region Button Region with Title Button Region without Title Chart Region Form Region Hide and Show Region List Region with Icon (Chart) Navigation Region Navigation Region, Alternative 1 Region without Buttons and Title Region without Title Report Filter - Single Row Report List Reports Region Reports Region 100% Width Reports Region, Alternative 1 Sidebar Region Sidebar Region, Alternative 1 Wizard Region Wizard Region with Icon Sequence
    Display Point After Header Page Template Body (1. items below region content) Page Template Body (2. items below region content) Page Template Body (3. items above region content) Before Footer Page Template Region Position 1 Page Template Region Position 2 Page Template Region Position 3 Page Template Region Position 4 Page Template Region Position 5 Page Template Region Position 6 Page Template Region Position 7 Page Template Region Position 8 Column 1 2 3 4 5 6 7 8 9
    [Body][Pos.1][Pos.2][Pos.3][Pos.4]
    Region HTML table cell attributes
    Source
    Region Source
    SELECT TK_IN_TIME,
    TK_OUT_TIME
    from "DAPDEV"."TIME_KEEPING_T"
    Use Query-Specific Column Names and Validate Query
    Use Generic Column Names (parse query at runtime only)
    Maximum number of generic report columns:

  • ORA-00928(Missing Select Keyword)

    Hi All. This procedure searches for a given keyword in all the tables of a schema.
    BEGIN
    EXECUTE IMMEDIATE 'DROP TABLE Results CASCADE CONSTRAINTS';
    EXCEPTION WHEN OTHERS THEN NULL;
    END;
    CREATE GLOBAL TEMPORARY TABLE Results
         ColumnName nvarchar2 (370) ,
         ColumnValue nvarchar2 (3630)
         ON COMMIT PRESERVE ROWS
    CREATE OR REPLACE PROCEDURE SearchAllTables
         SearchStr IN      NVARCHAR2 DEFAULT NULL,
         RCT1 IN OUT      GLOBALPKG.RCT1
    AS
         TableName NVARCHAR2(256);
         ColumnName NVARCHAR2(128);
         SearchStr2 NVARCHAR2(110);
         ASSIGNMENTVARIABLE0 NUMBER := 0;
         BEGIN
              EXECUTE IMMEDIATE 'TRUNCATE TABLE Results';
              TableName := '';      
              SearchStr2 := '%' || SearchStr || '%';
    << LABEL1 >>
              WHILE TableName IS NOT NULL
              LOOP
              BEGIN      
                   ColumnName := '';      
                   SELECT MIN(TABLE_SCHEMA || '.' || TABLE_NAME) INTO TableName
                   FROM INFORMATION_SCHEMA.TABLES
                   WHERE     TABLE_TYPE = 'BASE TABLE'
                   AND     TABLE_SCHEMA || '.' || TABLE_NAME > SearchAllTables.TableName
                   AND     OBJECTPROPERTY(ASSIGNMENTVARIABLE0, 'IsMSShipped') = 0;
    << LABEL2 >>
                   WHILE ( TableName IS NOT NULL ) AND ( ColumnName IS NOT NULL )
                   LOOP
                   BEGIN      
                        SELECT MIN(COLUMN_NAME) INTO ColumnName
                        FROM INFORMATION_SCHEMA.COLUMNS
                        WHERE     TABLE_SCHEMA = PARSENAME(SearchAllTables.TableName, 2)
                        AND     TABLE_NAME = PARSENAME(SearchAllTables.TableName, 1)
                        AND     DATA_TYPE IN ( 'char' , 'varchar' , 'nchar' , 'nvarchar' )
                        AND     COLUMN_NAME > SearchAllTables.ColumnName;
                        IF ColumnName IS NOT NULL THEN
                        BEGIN
                             INSERT INTO Results EXEC
                                       ( 'SELECT ''' || SearchAllTables.TableName || '.' || SearchAllTables.ColumnName || ''', LEFT(' || SearchAllTables.ColumnName || ', 3630)
                                                      FROM ' || SearchAllTables.TableName || ' (NOLOCK) ' || ' WHERE ' || SearchAllTables.ColumnName || ' LIKE ' || SearchAllTables.SearchStr2 );
                        END;
                        END IF;
                   END;
                   END LOOP;
              END;
              END LOOP;
              OPEN RCT1 FOR
              SELECT
                        ColumnName,
                        ColumnValue
              FROM Results;
         END;
    /

    IF ColumnName IS NOT NULL THEN
    BEGIN
    INSERT INTO Results EXEC
    ( 'SELECT ''' || SearchAllTables.TableName || '.' || SearchAllTables.ColumnName || ''', LEFT(' || SearchAllTables.ColumnName || ', 3630)
    FROM ' || SearchAllTables.TableName || ' (NOLOCK) ' || ' WHERE ' || SearchAllTables.ColumnName || ' LIKE ' || SearchAllTables.SearchStr2 );
    END;That's a static INSERT statement but it appears the SELECT wants to be dynamic. Given the way the query is put together, I would think you intended the INSERT to be dynamic.

  • Re: ORA-00928: missing SELECT keyword

    Hi
    I have created a question in Access and then copied the SQL question from it. When I try to run it in eg SQL plus I get an error.From the error I understand that there must be one more Select statement but I can't figure out where or why.
    I am trying to access an Oracle DB so I guess I must change the question but I am not sure how.
    SELECT MC_POSUM.ID, MC_POLINE.ID, MC_INVTRANS.TQTY_AMT, MC_PCITEM.ITID, MC_INVTRANS.PRSD_DTTM, MC_EMPLOYEE.AENM, MC_EMPLOYEE_1.AENM, MC_STOREROOM.STOREID, MC_STOREROOM.STOROI, MC_INVTRANS.TRNTYP
    FROM ((((((MC_POSUM INNER JOIN MC_POLINE ON MC_POSUM.POSUMOI = MC_POLINE.PO_OI) INNER JOIN MC_PODEL ON MC_POLINE.POLNOI = MC_PODEL.POLINE_OI) INNER JOIN MC_INVTRANS ON MC_PODEL.PODELOI = MC_INVTRANS.PODEL_OI) INNER JOIN MC_EMPLOYEE ON MC_INVTRANS.AUDT_USER_OI = MC_EMPLOYEE.EMPOI) INNER JOIN MC_PCITEM ON MC_POLINE.PCITEM_OI = MC_PCITEM.PCITOI) LEFT JOIN MC_STOREROOM ON MC_INVTRANS.STOR_OI = MC_STOREROOM.STOROI) INNER JOIN MC_EMPLOYEE AS MC_EMPLOYEE_1 ON MC_POSUM.BUY_OI = MC_EMPLOYEE_1.EMPOI WHERE (((MC_EMPLOYEE_1.AENM) Not Like [MC_EMPLOYEE.AENM]) AND ((MC_STOREROOM.STOROI) Not Like 32050) AND ((MC_INVTRANS.TRNTYP) Like 5));

    Just guessing here, but if you are on an Oracle version prior to 9, it does not support the JOIN ON syntax. If you run the query in Access, the ODBC driver takes care of the conversion.
    Prior to 9, a join in Oracle is done by including all tables in the FROM clause, and then specifying the relationship between the tables in the WHERE clause. An OUTER join is accomplished by adding (+) to the relationship for the table that you want to make up rows for. So, in Oracle, your query would be something like:
    SELECT mc_posum.id, mc_poline.id, mc_invtrans.tqty_amt, mc_pcitem.itid,
           mc_invtrans.prsd_dttm, mc_employee.aenm, mc_employee_1.aenm,
           mc_storeroom.storeid, mc_storeroom.storoi, mc_invtrans.trntyp
    FROM mc_posum, mc_poline, mc_podel, mc_invtrans, mc_employee, mc_pcitem,
         mc_storeroom, mc_employee mc_employee_1
    WHERE mc_posum.posumo1         = mc_poline.po_oi and
          mc_poline.polnoi         = mc_podel.poline_oi and
          mc_podel.podeloi         = mc_invtrans.podel_oi and
          mc_invtrans.audt_user_oi = mc_employee.empoi and
          mc_poline.pcitem_oi      = mc_pcitem.pcitoi and
          mc_invtrans.stor_oi      = mc_storeroom.storoi(+) and
          mc_posum.buy_oi          = mc_employee_1.empoi and
          mc_employee_1.aenm      <> mc_employee.aenm and
          mc_storeroom.storoi     <> 32050 and
          mc_invtrans.trntyp       = 5;HTH
    John

  • EDQ - error exporting to DB: ORA-00928 missing SELECT

    Hi,
    I am using EDQ v12.1.3.0.0 and have created a very basic proof of concept process which takes as input a comma-demilited file through the Reader process and then has a Write processor to write the input to Staged Data.
    I am then trying to Export the staged data to the relevant table in the database but get the following error message:
    'xxxxxx failed: Problem writing insert batch to database: ORA-00928: missing SELECT keyword.
    The input file/staged data only contains a single comma-delimited file with 3 fields and on the other side in the database, all I have in the schema is a single table which I am writing to. I can connect to my target DB datastore in EDQ without any problems.
    Does anyone have any ideas as to what could be causing this? Reading up on this error suggests that it is to with the SELECT keyword missing from a CREATE VIEW statement but I am not sure where or why it is trying to create a view.
    Any help would be much appreciated.

    Hi Mike,
    Many thanks for your quick response.
    I am writing to an existing table and wasn't seeing the three options which you've suggested, and which I've seen also appear in the documentation. But based on what you've said above, I now understand that I won't see those options because I am running a standalone export by right-clicking in the tree, rather than in a job.
    The target table didn't have a PK defined and I have since added one and ran the stand-alone export again and it has worked this time - Thanks. Thanks also for pointing out that the export will be DELETING and INSERTING - I was wondering why each time the export was failing it was removing records from the table, as I thought in this mode it would just be doing a straightforward INSERT. (So it was doing the DELETE part ok but failing on the INSERT).
    I would also like to know another couple of things please.
    1) How can I add this Export to a newly created Job? I have created a Job and put my Process in there, but when I try and drag-and-drop the Export, I get a no-entry sign indicating that I'm not allowed to do this. My target datastore is server-based rather than client-based and I thought that this should be ok if doing an export.
    2) Is it possible to call database stored procedures on the target database and then let that take care of inserts? E.g. rather than letting EDQ insert the records straight into the target DB, would like to make a call to a PL/SQL stored procedure which takes the data to be inserted as input (if at all possible, I understand this could be difficult if dealing with multiple records, unless the procedure can be called each time for each record), and then performs some checks before inserting the records.
    EDIT: regarding point 2 above, I have just come across this - How to call Oracle Stored Procedure using EDQ.

  • Missing SELECT keyword!

    Another roadblock for me. I will try to describe this in detail.
    I am joining table A & B based on a key.
    Then I am updating a column in Table A based on the same key which has been defined as the "Update Key".
    The update of the column is done based on a CASE WHEN statement.
    In the interface step: Integration - Insert new rows, it's building the following query:
    /* DETECTION_STRATEGY = NOT_EXISTS */
    insert into      MIG_PROF.ATTRIB_MATRIX T
    select      
    from     ODIWORK.I$_ATTRIB_MATRIX S
    where     IND_UPDATE = 'I'
    Where select expression is left blank!!
    The error I am getting is:
    +928 : 42000 : java.sql.SQLException: ORA-00928: missing SELECT keyword+
    Need your help.

    Something is wrong...
    I took a look in my IKM Oracle Incremental Update and the step 262 "Insert new row" is checked only to Insert... It means that this step shouldn't be active when you let, at interface, the Insert option to "No"
    Edit this step in your IKM, go to Options tab and see if only the "Insert" option is checked. If not, check only it.
    Cezar Santos
    [www.odiexperts.com]

  • Error in MERGE statement - ORA-00969: missing ON keyword

    Hi All ,
    I am trying to write a Merge statement , but I am getting the below error .
       MERGE  INTO main_table m
                              USING  tab_1 l, tab_2 u
                              ON  (   l.col1        =  m.col1
                                       AND u.col2 = l.col2)
    When Matched then
    update........
    When not mached then
    Insert  ...... 
    But here I am using 2 tables in the USING clause . and here I am getting  this error :-
    142/17   PL/SQL: SQL Statement ignored
    143/42   PL/SQL: ORA-00969: missing ON keyword
    May I know where i am doing wrong ?

    Hi LuKKa, you are on the Portugues Forum, but we can help you, try the code mentioned below:
       MERGE  INTO main_table m
                              USING  (select l.col1, l.col2, u.col2 from tab_1 l join tab_2 u on (u.col2 = l.col2)) t
                              ON  (t.col1 =  m.col1)
    When Matched then
    update........
    When not mached then
    Insert  ......  
    Regards.

  • Error message: 'ORA-00926:missing VALUES keyword

    Hi Friends,
    I am trying to update a database table in SAPR3.ORACLE database from CRM via an ABAP program.
    I did required BDCON setup. But I get the error message : ORA-00926:missing VALUES keyword.
    Looking forward your help to solve this problem.  Anyone came across such issue?
    below is my code and BDCON setup
    DB Connection      DB_CONNECT
    DBMS               ORA
    User Name          test_db
    DB password                                      
    Conn. info         sapde9db00a
    Connection Limit   10
    Optimum Conns      5
    TABLES: BUT000.
    DATA: EXC_REF TYPE REF TO CX_SY_NATIVE_SQL_ERROR,
    ERROR_TEXT TYPE STRING.
    DATA W_PARTNER TYPE BUT000-PARTNER.
    TYPES: BEGIN OF TYP_PARTNER,
           MANDT TYPE SY-MANDT,
           PARTNER_NUMBER TYPE BU_PARTNER,
          END OF TYP_PARTNER.
    DATA: ZZ_TEST TYPE STANDARD TABLE OF TYP_PARTNER WITH HEADER LINE.
    DATA: DBTYPE TYPE DBCON_DBMS,
          DBCUR TYPE CURSOR,
    T_BUT000 LIKE BUT000 OCCURS 0 WITH HEADER LINE.
    SELECT * INTO CORRESPONDING FIELDS OF TABLE T_BUT000 FROM BUT000 ORDER BY PRIMARY KEY.
    LOOP AT T_BUT000.
      ZZ_TEST-MANDT = SY-MANDT.
      ZZ_TEST-PARTNER_NUMBER = T_BUT000-PARTNER.
      APPEND ZZ_TEST.
    ENDLOOP.
    TRY.
        EXEC SQL.
          SET CONNECTION  'DB_CONNECT'
        ENDEXEC.
        EXEC SQL.
          CONNECT TO  'DB_CONNECT'
        ENDEXEC.
       LOOP AT ZZ_TEST.
        EXEC SQL.
          INSERT INTO SAPR3."ZZTEST_DB":
          (mandt, partner_number) VALUES('220', '0000000253');
        ENDEXEC.
        IF SY-SUBRC <> 0.
        ENDIF.
       ENDLOOP.
      CATCH CX_SY_NATIVE_SQL_ERROR INTO EXC_REF.
        ERROR_TEXT = EXC_REF->GET_TEXT( ).
        MESSAGE ERROR_TEXT TYPE 'I'.
    ENDTRY.
    EXEC SQL.
      SET CONNECTION DEFAULT
    ENDEXEC.
    Thanks in advance for you help,
    regards
    DJ

    Hi,
    See my complete code to update values using internal table
    TABLES: BUT000.
    DATA: EXC_REF TYPE REF TO CX_SY_NATIVE_SQL_ERROR,
    ERROR_TEXT TYPE STRING.
    DATA W_PARTNER TYPE BUT000-PARTNER.
    TYPES: BEGIN OF TYP_PARTNER,
           MANDT TYPE SY-MANDT,
           PARTNER_NUMBER TYPE BU_PARTNER,
          END OF TYP_PARTNER.
    DATA: ZZ_TEST TYPE STANDARD TABLE OF TYP_PARTNER WITH HEADER LINE.
    DATA: DBTYPE TYPE DBCON_DBMS,
          DBCUR TYPE CURSOR,
    T_BUT000 LIKE BUT000 OCCURS 0 WITH HEADER LINE.
    SELECT * INTO CORRESPONDING FIELDS OF TABLE T_BUT000 FROM BUT000 ORDER BY PRIMARY KEY.
    LOOP AT T_BUT000.
      ZZ_TEST-MANDT = SY-MANDT.
      ZZ_TEST-PARTNER_NUMBER = T_BUT000-PARTNER.
      APPEND ZZ_TEST.
    ENDLOOP.
    TRY.
        EXEC SQL.
          SET CONNECTION  'DB_CONNECT'
        ENDEXEC.
        EXEC SQL.
          CONNECT TO  'DB_CONNECT'
        ENDEXEC.
        LOOP AT ZZ_TEST.
          EXEC SQL.
            INSERT INTO SAPR3.ZZTEST_DB (mandt, partner_number) VALUES (ZZ_TEST-MANDT, ZZ_TEST-PARTNER_NUMBER);
          ENDEXEC.
          IF SY-SUBRC <> 0.
          ENDIF.
        ENDLOOP.
      CATCH CX_SY_NATIVE_SQL_ERROR INTO EXC_REF.
        ERROR_TEXT = EXC_REF->GET_TEXT( ).
        MESSAGE ERROR_TEXT TYPE 'I'.
    ENDTRY.
    EXEC SQL.
      SET CONNECTION DEFAULT
    ENDEXEC.
    Edited by: Mourougane DJEARAMANE on Mar 31, 2008 2:11 PM

  • ORA-30648 - missing LOCATION keyword

    All,
    I am attempting to import via datapump an exported file (2 tables) from our lab to our production database.
    The job is submitted and fails within 15 seconds due to the following error:
    ORA-31693: Table data object "MYDATA"."TABLE1" failed to load/unload and is being skipped due to error:
    ORA-30648: missing LOCATION keyword
    This repeats for both tables selected for import.
    The tables do NOT exist under the schema where they are being imported. I attempted to use both the "Entire file" option
    and the "tables" option, selecting both tables that are in the file. Either option produces the same error.
    I granted read and write to the user of the directory so it does not appear to be a missing location relative to the directory on the server.
    Ideas?
    Gerry

    All,
    The issue IS related to having a dba_directories entry where a lower-case value is used and perhaps with a "-".
    I successfully loaded the data by migrating it to a directory that was defined as upper-case (within the data movement options of the GRID).
    The value is defined in dba_directories. Though permissions were granted to the user by enclosing double-quotes (") around the value I think there
    is a problem when using lower-case values as directory names.
    Anyway, dropping and re-creating the dba_directory entry as BACKUP-BACKUPS (formally lower-case) and re-granting resolved the issue.
    Thanks
    Gerry

  • ORA-02000: missing UNUSED keyword

    Hi,
    I have a table tab_xyz
      CREATE TABLE tab_xyz(
        col1 number,
        col2 varchar2(10)
      ORGANIZATION EXTERNAL
        TYPE ORACLE_LOADER DEFAULT DIRECTORY "MF_DIR" ACCESS PARAMETERS ( records
        delimited BY newline badfile MF_DIR:'xyz.csv.bad' logfile MF_DIR:'
        xyz.csv.log' discardfile MF_DIR:'xyz.csv.dsc' fields terminated BY
        ',' ) LOCATION ( 'xyz.csv' )
      I'm trying to add reject limit to 100 but getting the below error:
      ALTER TABLE tab_xyz SET REJECT_LIMIT 100;
      Error starting at line 8 in command:
      ALTER TABLE tab_xyz SET REJECT_LIMIT 100
      Error report:
      SQL Error: ORA-02000: missing UNUSED keyword
      02000. 00000 -  "missing %s keyword"
      I tried to add the UNUSED keyword.. but error again
      ALTER TABLE tab_xyz  SET UNUSED REJECT_LIMIT 100;
      Error starting at line 8 in command:
      ALTER TABLE tab_xyz UNUSED SET REJECT_LIMIT 100
      Error report:
      SQL Error: ORA-01735: invalid ALTER TABLE option
      01735. 00000 -  "invalid ALTER TABLE option"
      *Cause:   
      *Action:
      I have 2 questions:
    1. how can I set the reject limit?
    2. where can I set when(01) = '"' in the create table
    Thanks.

    Can someone please look into the below issue:
    I tried to add the load when in my create table script..
      create table tab_xyz
        col1 varchar2(10),
        col2 varchar2(10)
      ORGANIZATION EXTERNAL
        TYPE ORACLE_LOADER DEFAULT DIRECTORY "MF_DIR" ACCESS PARAMETERS (
        records delimited BY newline
        load when (01) = '"'
        badfile mf_dir:'xyz.csv.bad'
        logfile mf_dir:'xzy.csv.log'
        discardfile mf_dir:'xyz.csv.dsc'
        fields terminated BY ',' optionally enclosed BY '"' MISSING FIELD VALUES ARE NULL 
        (col1, col2)
        LOCATION ('xyz.csv' )) 
      REJECT LIMIT 100;  but got the below error:
    ORA-29913: error in executing ODCIEXTTABLEOPEN callout
    ORA-29400: data cartridge error
    KUP-00554: error encountered while parsing access parameters
    KUP-01005: syntax error: found ")": expecting one of: "colon"
    KUP-01007: at line 2 column 19
    29913. 00000 -  "error in executing %s callout"
    *Cause:    The execution of the specified callout caused an error.
    *Action:   Examine the error messages take appropriate action.Thanks.

  • ORA-00926: missing VALUES keyword

    Hello,
    when i try to start an insert statement at a remote database I m getting the following error message:
    ORA-00926: missing VALUES keyword
    the statement is INSERT INTO <TABLE> VALUES(100,12,01-Dec-10,'ENTRY')
    the table has the following form: COL1 (NUMC), COL2(NUMC, COL3(DATE) COl4 (VARCHAR255)
    i tried to use several formats but i m not getting any solution for inserting. The user i m using has the privileges for inserting.
    has anyone a solution what will be the error?
    Thanks

    Hi,
    Try to use the following format instead:
    INSERT INTO <table_name> (<field1>,<field2>,...) VALUES (<value1>,<value2>,...);
    Br,
    Javier

  • ORA-00926: missing VALUES keyword | when importing data

    Hello,
    I get the missing VALUES keyword error when importing data from an Excel spreadsheet. Until yesterday everything worked fine. Today I'm having this problem because OSD does not build the DML correctly. See:
    insert into WFT_GROEPEN (CODE,OMSCHRIJVING,NIVEAU,INDIC_LAAGSTE_NIVEAU) VALUES('1.1.1.1','- Value of business acquired',4,'N');
    Working with OSD 1.2.1 on Windows XP.
    Anyone got a clue?
    Kind regards,
    Dennis

    Hi,
    Thanks for your reply. I found the problem myself. I got 2 columns in the Excel sheet with the same name. Then OSD creates an insert statement like following which gives the 'missing VALUES keyword' error.
    insert into WFT_GROEPEN (CODE,OMSCHRIJVING,NIVEAU,INDIC_LAAGSTE_NIVEAU)NIVEAU) VALUES('3','Toelichting balans beleggingen',NULL,'N',NULL);
    Regards,
    Dennis

Maybe you are looking for

  • Windows won't open in Finder & Drop-down Menu bar items won't highlight

    *In the past several months I've had this problem several times--* Most often it is that when I double-click on a window (say my *HARD DRIVE*) it simply doesn't open. I try to open the TRASH-- same thing. Since this is generally happening when all wi

  • Go to a specific page within the PDF

    Hi, I try to figure out how to make a link to another page within the PDF doc. I tried with a button, but cannot specify the page number where I want the link. Does anyone can help me to make a link on a specific page within my doc? thanks

  • Default Order unit

    Hi All, I have a situation where, i am creating a STO requsition and then converting to STO. When i am creating a Stock transfer Purchase requsition the base unit of measure defaults in from the material master as EA. We have left the order unit to b

  • Workflow for Work Contract Approval

    Hello everybody, I need a Workflow for 2 level of approval of work contract. Whenever a user make a work contract it requires approval upto two level.If Authority1 approves the contract it will go for the 2nd level approval to authority 2.If Authorit

  • Where to find the migration reports and errors

    i am using Oracle SQL developer 3.0 for migrating MS SQL 2008 to oracle using migration wizard,after clicking on finish the tool throws the null as error window and asked me to look into migration reports. where should i find the migration reports an