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.
Similar Messages
-
Problem in merge statement -ORA-27432 Step does not exist for chain
Hi
I m getting ORA-27432 Step does not exist for chain error in merge statement.Please explain the same.
MERGE INTO fos.pe_td_hdr_sd B
USING (
SELECT ACTIVE, ADDUID, ADDUIDTIME,TDKEY FROM pe.pe_td_hdr
WHERE (adduidtime like '20070104%' or edituidtime like '20070104%')
AND NVL(legacy_td,'N')<>'Y'
AND SUBSTR(adduidtime,1,4)='2007'
AND AMENDMENT_NO=0)A ON ( B.TDKEY = A.TDKEY)
WHEN MATCHED THEN
UPDATE SET B.ACTIVE=A.ACTIVE,
B.ADDUID=A.ADDUID,
B.ADDUIDTIME=A.ADDUIDTIME
WHEN NOT MATCHED THEN
INSERT
B.ACTIVE,
B.ADDUID,
B.ADDUIDTIME)
VALUES(
A.ACTIVE,
A.ADDUID,
A.ADDUIDTIME)This query is a short version of the main query.It is same but having 180 columns in original table.What version of Oracle are you using? This message does not appear in my 10.1 Error Messages document, but the other messages in that range seem to be about DBMS_SCHEDULER.
Are you using scheduler somewhere around where you are getting the error message?
John -
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. -
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. -
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,
RamHi,
Please do not post the same question in multiple newsgroups.
Please see my reply in the other group.
thanks -
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
DJHi,
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-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?
ThanksHi,
Try to use the following format instead:
INSERT INTO <table_name> (<field1>,<field2>,...) VALUES (<value1>,<value2>,...);
Br,
Javier -
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. -
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:10Don'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-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?
GerryAll,
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-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.
ThanksSTAR_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 -
Getting an error in MERGE statement
Hi,
I am getting an error "missing keyword" when I execute the MERGE statement.
Here I have attached copy of MERGE statement which I am trying to execute.
(My requirement is if I find matching record then insert again it's a business requirement. And if not then set flag)
MERGE INTO t1
USING t2
ON (conditions)
WHEN MATCHED THEN
INSERT (column list from t1)
VALUES (from t2)
WHEN NOT MATCHED THEN
UPDATE
SET ... ;
Can someone guide me?
Thanks,This is why I told you yesterday in this thread...
Need suggestion in MERGE Statement
...that what you're asking is the opposite of the way MERGE works.
Guess you didn't want to believe me. -
Invalid Number Error in Merge Statement
Hi all.
I got an invalid number error in the following merge statement, but I don't know why. Maybe you can give me a hint.
MERGE INTO wam_table
USING (SELECT * FROM wam_table) b
ON (b.username = 'user'
AND b.mod = 'module'
AND b.trimester = '1')
WHEN MATCHED THEN
UPDATE SET as = '1', ad = '1', co = '1', pr = '1', date = localtimestamp, lus = 'username'
WHEN NOT MATCHED THEN
INSERT VALUES ('user','module','1','1','1','1','1', localtimestamp, 'username');
The invalid number error appears in the first line, but I don't know why?
StephanUPDATE SET as = '1', ad = '1', co = '1', pr = '1', date = localtimestamp, lus = 'username'SELECT * FROM sys.v_$reserved_words;
SQL> create table test1(as varchar2(10));
create table test1(as varchar2(10))
ERROR at line 1:
ORA-00904: : invalid identifier
SQL> create table test1(sno number, date date);
create table test1(sno number, date date)
ERROR at line 1:
ORA-00904: : invalid identifier
SQL> create table test1("as" varchar2(10));
Table created.
SQL>
SQL> create table test2(sno number, "date" date);
Table created.
SQL> desc test1
Name Null? Type
as VARCHAR2(10)
SQL> desc test2
Name Null? Type
SNO NUMBER
date DATE
SQL> -
Error in Merge statement for Oracle 10gR2
Hi,
When I use the MERGE statement to copy data across a database link (from 10gR2 to 10gR2 database), if I have both an update and insert clause it works fine, but if I omit the insert clause and have just update on its own, I get error "ORA-02064: distributed operation not supported".
Can anyone help on thisThis came up in a thread last week, the 10g versions of MERGE (without INSERT or with DELETE) did not appear to work over DB links.
-
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 AMchk this
SQL syntax exception: missing expression?
http://www.coderanch.com/t/302720/JDBC/java/missing-expression-error
Maybe you are looking for
-
Time server 1:55:50 wrong!! how could this be??
Hello everybody, I am develloping an application where I get the time from a time sever and update the (embedded) system time. But I am getting from the server 1h55min minutes earlier than it should be. Most of it I think come from my GMT+0200 locati
-
Active Directory Not Replicating
Hey Guys, I have a Windows 2012 server but it has a demo license, this is also my DC. I am trying to create another DC and let it replicate so I can license the new properly and stuff. I have the DNS of each server pointing to each other as the prima
-
Video freeze, sound only, no solution
I'm having problems with video iChat. Shortly after I connect, my video freezes (both send and receive) but the chat continues with sound. If I try doing anything in iChat (like quitting) I get the spinning wheel of death. The only thing I can do at
-
Server 2008 and MS Access 2007 Scheduled Task
I have a Server 2008 with MS Access 2007 installed. I created a task that is designed to lanuch Access, open a designated database, and run a macro. The macro calls a function within the database that generates a series of reports in PDF format for u
-
Cancel Material Doc.- Return to vendor created by Quality decision
Hi, How to cancel material document which is created as Return to Vendor ( Mvt. type 122) using Usage decision in Quality module. One bypass may be to recive GR agianst the PO. Is there any other better solution than this? Krishna