ORA-00928
Hello,
I have following message and I am wondering what need to correct.
Invalid exists/not exists condition: ORA-00928: missing SELECT keyword
Thanks in advance,
EB NY
EB,
it looks like for one of your items, the condition or the validation is set to (exist or does not exisit..) .If this is not something done by mistake, then please provide us with the query you are using to verify.
Thanks,
Sam
Please reward good answers by marking them correct or helpful!
Similar Messages
-
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 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. -
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 -
Hi,
I have a strange error can anyone decipher this one - When I edit a page and change the "standard tab set" to a particular tab set I get the following error message when running the page.
"Invalid exists/not exists condition: ORA-00928: missing SELECT keyword "
When I run the page with no tab-set there is no error.
Thanks in advance,
BrandonHi,
I have a strange error can anyone decipher this one - When I edit a page and change the "standard tab set" to a particular tab set I get the following error message when running the page.
"Invalid exists/not exists condition: ORA-00928: missing SELECT keyword "
When I run the page with no tab-set there is no error.
Thanks in advance,
Brandon -
"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 -
Hi all,
I created some tables for a database that is going to be OS
independent.
When i put some values to a specific table, I have tha following
problem:
At the time that i put the values, to the table, i receive the
error message "ORA-00928, SELECT Keyword missing"
This table has a foreign key which is referenced to another
table and column.
i don't think that i am making any mistake in the setting of the
constraintsm because i made 2 more tables with the same
constraints and i didnot have any problem.
I am confused, cause I am now bacoming familiar with the oracle
environment and i don't know many things about oracle.
From your experience, what could cause the problem?
Kind regards,
K.Here are some examples that may help make things clearer. In
the following examples, to simplify things and focus on the
problem, I have limited the create table statement to just the
columns, without constraints or anything else.
If you create the table your way, using reserved words enclosed
in doubles quotes:
SQL> CREATE TABLE "SCOTT"."TRANSACTION_BATCH"
2 ("NUMBER" NUMBER(8) NOT NULL,
3 "DATE" DATE NOT NULL,
4 "TYPE" VARCHAR2(10) NOT NULL,
5 "FILENAME" VARCHAR2(20),
6 "TOTALTRANSACTIONS" NUMBER(8) NOT NULL)
7 /
Table created.
The table gets created O.K., but when you try to insert your
way, using the reserved words, without the quotes, you get:
SQL> INSERT INTO "SCOTT"."TRANSACTION_BATCH"
2 (NUMBER,
3 DATE,
4 TYPE,
5 FILENAME,
6 TOTALTRANSACTIONS)
7 VALUES
8 (1,
9 TO_DATE (",'dd-Mon-yyyy HH:MI:SS AM'),
10 '1',
11 ",
12 2)
13 /
(NUMBER,
ERROR at line 2:
ORA-00928: missing SELECT keyword
In the above, when it gets to line 2, it knows it can't insert a
column called NUMBER, so it looks for a SELECT instead, and
doesn't find it.
However, if you insert with double quotes around the column
names, it works:
SQL> INSERT INTO SCOTT.TRANSACTION_BATCH
2 ("NUMBER",
3 "DATE",
4 "TYPE",
5 "FILENAME",
6 "TOTALTRANSACTIONS")
7 VALUES
8 (1,
9 SYSDATE,
10 '1',
11 NULL,
12 2)
13 /
1 row created.
However, it would be better to drop the table and recreate it,
using column names that aren't reserved key words:
SQL> DROP TABLE transaction_batch
2 /
Table dropped.
SQL> CREATE TABLE "SCOTT"."TRANSACTION_BATCH"
2 (NUMBER_COL NUMBER(8) NOT NULL,
3 DATE_COL DATE NOT NULL,
4 TYPE VARCHAR2(10) NOT NULL,
5 FILENAME VARCHAR2(20),
6 TOTALTRANSACTIONS NUMBER(8) NOT NULL)
7 /
Table created.
Then, you can insert without the double quotes:
SQL> INSERT INTO SCOTT.TRANSACTION_BATCH
2 (NUMBER_COL,
3 DATE_COL,
4 TYPE,
5 FILENAME,
6 TOTALTRANSACTIONS)
7 VALUES
8 (1,
9 SYSDATE,
10 '1',
11 NULL,
12 2)
13 /
1 row created.
To further illustrate the problem and show you what I meant when
I said that creating the table without the double quotes would
have brought the problem to your attention then, suppose we try
to do that using the reserved words:
SQL> DROP TABLE transaction_batch
2 /
Table dropped.
SQL> CREATE TABLE "SCOTT"."TRANSACTION_BATCH"
2 (NUMBER NUMBER(8) NOT NULL,
3 DATE DATE NOT NULL,
4 TYPE VARCHAR2(10) NOT NULL,
5 FILENAME VARCHAR2(20),
6 TOTALTRANSACTIONS NUMBER(8) NOT NULL)
7 /
(NUMBER NUMBER(8) NOT NULL,
ERROR at line 2:
ORA-00904: invalid column name
The above tells us that NUMBER is a reserved word and should not
be used as a column name. The same is true for DATE. Putting
them in double quotes to get around that problem causes more
problems than it solves. Unfortunately there are some
applications out there that automatically insert double quotes
in some places and not in others. -
Please help to solve this error message ORA-00928
hallo, I'm sorry if it's wrong place to answer a question like that cause I'm a newbie :( .
I have some php problem like above :
<?php
//connect to database
$db = "";
$conn = ocilogon("system", "tubes", $db);
if ( !$conn ) {
echo "Status : Connection Error, mangga di lereuskeun heula : " . var_dump( OCIError() );
//input data
$id = $_POST[id_jenis_zakat];
$jenis = $_POST[jenis_zakat];
$barang = $_POST[jenis_barang];
$jumlah = $_POST[jumlah];
$stmt = OCIParse($conn, "insert into zakat value( $id ,$jenis ,$barang ,$jumlah)");
$s = ociexecute($stmt);
if (!$s){
echo "Input Data Error, mangga didangdosan heula".var_dump(ocierror());
?>
but, it's show this message
Warning: ociexecute() [function.ociexecute]: ORA-00928: missing SELECT keyword in C:\xampp\htdocs\baznas\coba.php on line 15
bool(false) Input Data Error, mangga didangdosan heula
so, What should I do ?so, What should I do ?Hm. I'm a php-noob, but it looks like a typo:
$stmt = OCIParse($conn, "insert into zakat value( $id ,$jenis ,$barang ,$jumlah)");Try:
$stmt = OCIParse($conn, "insert into zakat VALUES( $id ,$jenis ,$barang ,$jumlah)");If that doesn't work then perhaps the PHP forum can help you: PHP -
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 -
Can not insert a row to a table from Oracle DBA Studio
Hi,
I try to use the Oracle DBA Studio to create a table and put some test data in it. Here is what I found:
I start Oracle DBA Studio on the client machine by connecting to an Oracle server 8i (8.1.7). I create a simple table called Test with two columns: one is USER, VARCHAR2, 10; and the other is USER2, CHAR, 2. After that, I right click on the table name and select "Table Data Editor" from the popup menu. The table editor window shows up. I type in the value 'AA' and 'BB' in the grid of two columns. Then I click the Apply button. An error message box popped up:
ORA-00928 missing SELECT keyword.
I click Show SQL button. The SQL statement is as following:
INSERT INTO "TASYS"."TEST" (USER ,USER2 ) VALUES ('AA' ,'BB').
I copy the statement to SQL Plus and run it. The same error is generated. But if I remove (USER, USER2) from the statement, it inserts a row without complaint. In other word, the database will not allow to insert if individual columns are list. I realize something must wrong with the new server and client installed and could not figure out what happening. Hope someone can help.
Thanks.
nullI am not sure, but could it be that USER is a keyword or predefine word. Check Oracle'slist of predefine/keyword
-
Trouble Creating View Using Derived Values From With
I want to use the two values derived from the sql statements in my WITH to use in a view. This is my code:
WITH a AS(
SELECT
CASE
WHEN (SELECT stvterm_code
FROM stvterm
WHERE sysdate >= stvterm_start_date
AND sysdate <= stvterm_end_date) IS NOT NULL
THEN (SELECT stvterm_code
FROM stvterm
WHERE sysdate >= stvterm_start_date
AND sysdate <= stvterm_end_date)
ELSE
(SELECT min(stvterm_code)
FROM stvterm
WHERE stvterm_start_date > sysdate)
END cur_term
FROM dual),
b AS (
SELECT
CASE
WHEN (SELECT substr(cur_term,5, 2) FROM a) = '60' OR (SELECT substr(cur_term,5, 2) FROM a) = '40'
THEN (SELECT substr(cur_term,0, 4)||'20' FROM a)
WHEN (SELECT substr(cur_term,5, 2) FROM a) = '20'
THEN (SELECT to_char(to_number(cur_term)-100) FROM a)
END endof_prior_aidy_term
FROM dual
CREATE OR REPLACE VIEW jbartling.current_term AS
SELECT cur_term, endof_prior_aidy_term
FROM a,bHowever, I get the error ORA-00928: missing SELECT keyword. Is it possible to use WITH like this in creating a view? If not can someone show me another way to accomplish what I'm trying to do?Hi,
You need to put the CREATE at top, i.e
CREATE OR REPLACE VIEW jbartling.current_term AS
WITH a
SELECT .. FROM a,bRegards
Peter -
Error while Deploying Opaque view
Hi,
I have created an opaque view by selecting the New Physical table...option by right clicking on the database schema. I have written a statement by selecting the Table type as SELECT in the Physical Table dialog box as follows,
CREATE VIEW <view name> AS <select statement> where my select statement is like this "select * from emp".
When i'm trying to deploy the view i'm getting the following error:-
Details: [nQSError: 17001] Oracle Error code: 928, message: ORA-00928: missing SELECT keyword
at OCI call OCIStmtExecute.
[nQSError: 17011] SQL statement execution failed.
Can i know where i'm doing the mistake. Your help is greatly appreciated.
Thanks,
Kumar.Hi,
The problem caused because i used the syntax,
CREATE VIEW <view name> AS <select statement>
but we need to use only the select statement in the initialization block.
Maybe you are looking for
-
One or more hard drives in Server Backup are not connected
A year ago I moved from Windows Home Server to Server Essentials 2012 as a backup solution for my simple home configuration - 2 Windows 7 Professional desktops. It was a perfect solution and works flawlessly - and has saved my tail on numerous occas
-
Hi all, I saw that this topic has been up several times, but I felt that 11.000 hits is slightly too much to scan through. I have built my own template and I'm now creating a document including 15-20 pages. While writing it I intend to add new pages.
-
Can I setup Mail app to access Yahoo mail via IMAP?
Can I setup Mail app to access Yahoo mail via IMAP? I think that my iPhone is doing this, but what about the Apple Mail app on my Mac? I don't like the fact that the Mac downloads the e-mail messages and removes them from the server, therefore making
-
Advanced Graphs option seems missing in JDeveloper 11G
I am trying to do an exercise on "Data Visualization and Graphs in JSF". (http://www.oracle.com/technology/products/jdev/viewlets/11/) I have created a query on a table and am trying build a graph based on this query. When I try to build a graph in J
-
i want to post logo in sap scripts can any guide me raju