DBMS_ADVANCED_REQRITE get ORA-00905: lack of keyword
What I'm doing wrong here?17:17:29 NJ3417@pubd1> create table test_a (col_a varchar2(20));
Table created.
Elapsed: 00:00:00.04
17:17:55 NJ3417@pubd1> insert into test_a values('Red');
1 row created.
Elapsed: 00:00:00.02
17:18:09 NJ3417@pubd1> create table test_b (col_b varchar2(20));
Table created.
Elapsed: 00:00:00.02
17:18:32 NJ3417@pubd1> insert into test_b values('Blue');
1 row created.
Elapsed: 00:00:00.03
17:18:55 NJ3417@pubd1> commit;
Commit complete.
17:34:56 NJ3417@pubd1> begin
17:34:56 2 sys.dbms_advanced_rewrite.declare_rewrite_equivalence(
17:34:56 3 name => 'Mikes SQL override',
17:34:56 4 source_stmt => 'SELECT col_a FROM test_a',
17:34:56 5 destination_stmt => 'SELECT col_b FROM test_b',
17:34:56 6 validate => FALSE);
17:34:56 7 end;
17:34:56 8 /
begin
*
ERROR at line 1:
ORA-00905: missing keyword
ORA-06512: at "SYS.DBMS_ADVANCED_REWRITE", line 29
ORA-06512: at "SYS.DBMS_ADVANCED_REWRITE", line 185
ORA-06512: at line 2
17:54:18 NJ3417@pubd1> select * from v$version;
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
PL/SQL Release 11.2.0.3.0 - Production
CORE 11.2.0.3.0 Production
TNS for Solaris: Version 11.2.0.3.0 - Production
NLSRTL Version 11.2.0.3.0 - Production
5 rows selected.
Thank youMike
mtefft wrote:
What I'm doing wrong here?
I don't have your exact version but I think that you can't have any string as the name of the rewrite rule. Refer to the documentation
Here's the working example:
SQL> select * from v$version ;
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
PL/SQL Release 11.2.0.1.0 - Production
CORE 11.2.0.1.0 Production
TNS for Linux: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - Production
SQL> create table test_a (col_a varchar2(20));
Table created.
SQL> insert into test_a values('Red');
1 row created.
SQL> create table test_b (col_b varchar2(20));
Table created.
SQL> insert into test_b values('Blue');
1 row created.
SQL> commit ;
Commit complete.
SQL> select col_a from test_a ;
COL_A
--------------------
Red
SQL> select col_b from test_b ;
COL_B
--------------------
Blue
begin
sys.dbms_advanced_rewrite.declare_rewrite_equivalence(
name => 'Mikes SQL override',
source_stmt => 'SELECT col_a FROM test_a',
destination_stmt => 'SELECT col_b FROM test_b',
validate => FALSE);
end;
8 /
begin
*
ERROR at line 1:
ORA-00905: missing keyword
ORA-06512: at "SYS.DBMS_ADVANCED_REWRITE", line 29
ORA-06512: at "SYS.DBMS_ADVANCED_REWRITE", line 185
ORA-06512: at line 2
begin
sys.dbms_advanced_rewrite.declare_rewrite_equivalence(
name => 'myrule',
source_stmt => 'SELECT col_a FROM test_a',
destination_stmt => 'SELECT col_b FROM test_b',
validate => FALSE);
end;
8 /
PL/SQL procedure successfully completed.
SQL> show parameter rewrite
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
query_rewrite_enabled string TRUE
query_rewrite_integrity string enforced
SQL> alter session set query_rewrite_integrity=trusted ;
Session altered.
SQL> show parameter rewrite
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
query_rewrite_enabled string TRUE
query_rewrite_integrity string TRUSTED
SQL> select col_a from test_a ;
COL_A
--------------------
Blue
Tags: Database
Similar Questions
-
ASM >; ALTER DISKGROUP >; error: ORA-00905: lack of keyword
Oracle 10.2.0.3.0 on RHEL 5 database
SQL > create diskgroup data4
external redundancy 2
3 disc "ORCL:DATA4";
DiskGroup created.
SQL > ALTER DISKGROUP DATA4 SET the ATTRIBUTE "compatible.rdbms" = "10.1 ';
ALTER DISKGROUP DATA4 SET the ATTRIBUTE "compatible.rdbms" = "10.1 '."
*
ERROR on line 1:
ORA-00905: lack of keyword
Is not the correct syntax? Please help... Thank you!
SQL > alter diskgroup DATA4 set attribute "au_size" = "4 M";
alter diskgroup DATA4 set attribute "au_size" = "4 M"
*
ERROR on line 1:
ORA-00905: lack of keywordCipherDBA wrote:
Hi, Aman-I have check the syntax before posting this message. I always get the error message, even if I believe that my syntax is correct.
SET the ATTRIBUTE 'attributeName' = "attribute_value".
Have you seen my 2nd answer where I asked that you are sure that 4 M size to THE East actually possible in 10g ASM (10203 your version) as far as I KNOW, this has begun to 11.1 from which can reach the size of the AU to a default value of 1 M 64 M. And this must explain the reason why your order is a failure since it was added in 11.1 Reference sql of the DSO. See 2nd link I gave.
Aman...
-
Hi all
I have create report sql in version 4.2, and now we have apex version 5.0 upgrade.
I encountered error when I change the State of sql
The error massage:
Query cannot be parsed in the generator. If you believe that your query is syntactically correct, check the generic "columns" box below the source of the region without analysis. ORA-00905: lack of keyword
My SQL
SELECT VW.*
, CASE WHEN (VW.file_code is null
OR VW.cancel_flg = 'Y'
OR (TOUR_DEP_DATE + GET_FILE_LOCKING_DAYS (VW. (SBU_CODE) < = trunc (sysdate))
) THEN
' < font color = "Red" > < b > other < /b > < / police > '
ON THE OTHER
"< a href =" f? p = & APP_ID.:51: & SESSION. : O PR: & DEBUG. : 51:P51_FILE_CODE, P51_COSTING_CODE, P51_TOUR_REG_NO, P51_VERSION_NO, P51_REQUEST, P51_AGENT_NAME, P51_ADULTS, P51_CHILDS, P51_MKT_CODE, P51_QUOT_CURR:'
|| FILE_CODE | «, » || COSTING_CODE | «, » || TOUR_REG_NO | «, » || VERSION_NO | «, » ||' OPR' | «, » || AGENT_CODE | «, » || VW. FROM_PAX | «, » || 0||','|| VW.mkt_code | ',' | VW. QUOT_CURR |': ' > < font color = blue > < b > other < /b > < / police > '. "
END as "other Actions".
, CASE WHEN ((VW.file_code is not null AND TOUR_DEP_DATE + GET_FILE_LOCKING_DAYS (VW. (SBU_CODE) < = TRUNC (SYSDATE))
OR cancel_flg = 'Y '.
OR (VW. REF_COSTING_CODE = VW. ADDL_FIELD2 AND VW. ADDL_FIELD1 LIKE '% COPIED FROM % OF APPROVAL'
AND BOOKING_NAME LIKE "%-Backup")
) THEN
' < font color = "Red" > < b > edit < /b > < / police > '
ON THE OTHER
"< a href =" f? p = & APP_ID.:149: & SESSION. : & DEBUG. : 149:P149_COSTING_CODE:'
|| COSTING_CODE |': ' > < font color = blue > < b > edit < /b > < / police > '. "
END AS 'Edit '.
, CASE WHEN (Nvl (cancel_flg, 'n') = 'Y')
)
THEN
' < font color = "Red" > < b > add < /b > < / police > '
ON THE OTHER
"< a href =" f? p = & APP_ID.:33: & SESSION. : & DEBUG. : 33:P33_COSTING_CODE, P33_FILE_CODE, P33_MKT_CODE, P33_QUOT_CURR, P33_NO_OF_ADULT, P33_NO_OF_CHILD:'
|| COSTING_CODE | «, » || file_code | «, » || VW.mkt_code | ',' | VW. QUOT_CURR | «, » || VW. FROM_PAX | «, » || 0 | ': "> < font color = blue > < b > add < /b > < / police > '
END as 'Services '.
OF TOUR_MAS_VW VW
How to solve it.
Thank you
Dear friends
Thanks for your helping hands.
I found the solution for this. We can solve this problem by using these solutions
- A region of HTML:
click me
- Using PL/SQL:
htf.anchor('f?p=100:5:'||V('APP_SESSION'),'click me');
- Using a SQL query: SELECT htf.anchor('f?p=100:5:'||:APP_SESSION,'clickme') FROM DUAL;
We can write the query in the form
SELECT ' f? p = 100: 1 :'|| : APP_SESSION |': ' | : APP_UNIQUE_PAGE_ID |
': P1_EMPNO :'|| employe_id,
first name,
job_id
Employees
Thank you & best regards
CORINE
- A region of HTML:
-
ORA-00905: lack of keyword
Hi all
CREATE OR PACKAGE BODY ORDER_MANAGEMENT IS
FUNCTION GETERROR (ERRORCODE NUMBER) RETURN VARCHAR2
IS
V_ERRORDESC VARCHAR2 (500)
Error on line 1
ORA-00905: lack of keyword
V_ERRORCODE NUMBER (10);
Error on line 9
ORA-00900: invalid SQL statement
CURSOR TEST_ERROR IS
Error on line 10
ORA-00900: invalid SQL statement
SELECT TEXTE_ERREUR
OF API_ERRORS
WHERE ERROR_CODE = V_ERRORCODE
*
Error on line 3
ORA-00904: "V_ERRORCODE": invalid identifier
Any idea?
KaiLine
V_ERRORDESC VARCHAR2 (500);
missing a semicolon.
SY.
-
Help with query - get an ERROR: ORA-00905: lack of keyword
Can someone help me understand what the problem with this query? Thank you
Deanna
Select last_name. «, » || first name
in motor_assist2 (technician1_name)
of org1
where radionum =: p2_technician1_radio;Maybe this:
insert into motor_assist2 (technician1_name) select last_name||','||first_name from org1 where radionum=:p2_technician1_radio;
-
ORA-00905: lack of keyword against APEX
Hello
can someone explain my what is the problem with this query:
drop table emp_by_dept;
SELECT b.EMPLOYEE_ID, b.DEPARTMENT_ID IN emp_by_dept
Of
(SELECT EMPLOYEE_ID, DEPARTMENT_ID
Of oehr_employees
WHERE department_id = 30) b;
Gived by subqyery results
SELECT EMPLOYEE_ID, DEPARTMENT_ID
Of oehr_employees
WHERE department_id = 30
are:
EMPLOYEE_ID DEPARTMENT_ID
30 114
30 115
30 116
30 117
30 118
30 119
Download 6 lines returned in 0.02 secondsAs Blushadow says, select... in the syntax is used to select a single value in a variable, you cannot use it to create a table. This is the SQL Server syntax. If you want to really drop and re-create the table every time, then the correct syntax is:
drop table emp_by_dept; create table emp_by_dept as SELECT EMPLOYEE_ID, DEPARTMENT_ID FROM oehr_employees WHERE department_id = 30;
However, even once, as Blushadow pointed out, it is useless and generally considered bad practice in Oracle. You should either create the emp_by_dept once, like an ordinary table, then truncate and insert new data, or create table emp_by_dept once in a global temporary Table, and then use the TWG in what it is you do.
Who know that, my feeling is that it is extremely unlikely that you really need the emp_by_dept at all. In Oracle, the readers do not block writers, therefore, in most cases, you can simply use the selection from oehr_employees directly whenever you use emp_by_dept.
John
-
ORA-00928: lack of keyword SELECT when you create a trigger
Hello
I am trying to create a trigger that is simple for the purpose of verification as below:
This compiles with warning. When I check the warning, he said:CREATE OR REPLACE TRIGGER customer_audit before insert or update or delete on CUSTOMER for each row BEGIN if :old.cname is null and :new.cname is not null or :old.cname is not null and :new.cname is null or :old.cname != :new.cname THEN INSERT INTO audit_table (:old.cname, :new.cname, null, 'cname'); COMMIT; ENDIF; end;
Do not know how to SELECT is part of what I'm trying to do here, or miss me something of totally. Help, please. Thank you very much.TRIGGER customer_audit compiled Warning: execution completed with warning 3/32 PL/SQL: ORA-00928: missing SELECT keyword 3/7 PL/SQL: SQL Statement ignored
Change ENDIF; in END IF; and try again...
-
problem with an instruction box in where clause getting ora-00905
The query runs @ 07:00 every day and must return data for the last day, except Monday when the previous 3 days must be returned.
Select ip.adm_date+ip.adm_time/86400 as admDateTime,
IP.pt_code,
ICC. Surname,
CPI.first_given_name,
IP.w_code,
"as 'MR < 24."
"as"MR 24-36"
"as 'MR 36-48."
"as"MR 48-60,"
"" as "MR 60-72",.
"as 'MR > 72."
"as 'MR finalized."
«like "Pharm/Tech",
"as 'MR criteria."
Of
k_ipreg ip, k_cpireg ICC
where ip.pt_code = cpi.pt_code
and ip.disch_date is null
and ip.adm_date between ((affaire quand (select to_char (sysdate,'d ') of double) = 1 then ip.adm_date > sysdate-3))
of another ip.adm_date > sysdate-1
end)) and sysdate
and w_code not in ("ICW", "OEN", "ANTE", "BABY", "CHILD", "DELI", "ED", "MATY", "USSN")
Try to learn to use properly the functions of Oracle:
SELECT Ip.Adm_Date + Ip.Adm_Time / 86400 AS Admdatetime , Ip.Pt_Code , Cpi.Surname , Cpi.First_Given_Name , Ip.W_Code , '' AS "MR < 24" , '' AS "MR 24-36" , '' AS "MR 36-48" , '' AS "MR 48-60" , '' AS "MR 60-72" , '' AS "MR>72" , '' AS "MR Finalised" , '' AS "Pharm/Tech" , '' AS "Met MR Criteria" FROM K_Ipreg Ip, K_Cpireg Cpi WHERE Ip.Pt_Code = Cpi.Pt_Code AND Ip.Disch_Date IS NULL AND Ip.Adm_Date BETWEEN ( ( CASE WHEN TO_CHAR ( SYSDATE, 'd' ) = 1 THEN SYSDATE - 3 ELSE SYSDATE - 1 END ) ) AND SYSDATE AND W_Code NOT IN ('ICW', 'NWB', 'ANTE', 'BABY', 'CHILD', 'DELI', 'ED', 'MATY', 'SCBU');
-
CASE in a WHERE clause: ORA-00905
Hello world
I try to use a BOX in a WHERE clause clause and I got the error ORA-00905: lack of keyword. Here is my code:
SELECT id_reserv,
Concat (name, Concat ('_', index)) as name,
Libelle,
num_lot,
resa_keyword1,
resa_keyword2,
resa_keyword3,
resa_keyword4,
date_creation,
comm_creation,
id_util,
assets,
id_env_act,
(SELECT connection of user u where u.id_util = r.id_util) AS nom_util,
(SELECT name e environment where e.id_env = r.id_env_act) AS nom_env,
(SELECT count (*) of rc reserv_comp where rc.id_reserv = r.id_reserv) AS nbComp,
(SELECT count (*) MC reserv_modif where mc.id_reserv = r.id_reserv) AS nbModif
BOOKING r
WHERE the r.nom NOT LIKE 'RESERV_LOT_ % '.
AND id_util = '1'
AND active = '1'
AND id_env_act > = '-1'.
AND the MATTER sansdemande
WHEN true THEN id_reserv not in some id_reserv from demande_livraison where id_env_dep > = '-1'.
ELSE id_reserv = id_reserv
END
AND name LIKE '% '.
ORDER BY date_creation;
I already looked at the CASE statement and it seems that the syntax is correct, so I don't know I can use in a WHERE clause.
Any help would be nice!
AndalusiansHello
It should be something like this:
AND CASE WHEN 'false'='true' THEN (select id_reserv from demande_livraison where id_env_dep>='-1') ELSE id_reserv END = id_reserv
The subquery must return a line
But I think that it is better to write your query in the form:
SELECT id_reserv, concat(nom,concat('_',indice)) as nom, libelle, num_lot, resa_keyword1, resa_keyword2, resa_keyword3, resa_keyword4, date_creation, comm_creation, id_util, actif, id_env_act, (SELECT login from utilisateur u where u.id_util=r.id_util) AS nom_util, (SELECT nom from environnement e where e.id_env=r.id_env_act) AS nom_env, (SELECT count(*) from reserv_comp rc where rc.id_reserv=r.id_reserv) AS nbComp, (SELECT count(*) from reserv_modif mc where mc.id_reserv=r.id_reserv) AS nbModif FROM reservation r WHERE r.nom NOT LIKE 'RESERV_LOT_%' AND id_util='1' AND actif='1' AND id_env_act>='-1' AND ( ( 'false'='true' and id_reserv not in (select id_reserv from demande_livraison where id_env_dep>='-1') ) or ( 'true'= 'true' and id_reserv=id_reserv ) ) AND nom LIKE '%' ORDER BY date_creation;
This coding in SQL something as if a = b, then c, d also in the simplest form.
Herald tiomela
http://htendam.WordPress.com -
WITH ACE translated by ORA-00928: lack of SELECT keyword
Hi allWe run on Oracle 10 g. The following script is translated by ORA-00928: lack of keyword SELECT. Any ideas what causes this error? Two statements by operating by themselves, complete with success "select".
[code]
WITH A1 AS
WITH A1 (SELECT MIN (VAPS_RPT_INTV_DMSN. INTV_DT), VAPS_RPT_INTV_DMSN. RPT_ID, VAPS_RPT_INTV_DMSN. RPT_INTV_ID OF THE APS. VAPS_RPT_INTV_DMSN, APS. VAPS_RPT_CL_INTV_DMSN WHERE APS. VAPS_RPT_INTV_DMSN. RPT_INTV_ID = APS. VAPS_RPT_CL_INTV_DMSN. RPT_CL_INTV_ID AND VAPS_RPT_INTV_DMSN. HM_VST_IND = '1' GROUP OF VAPS_RPT_INTV_DMSN. RPT_ID, VAPS_RPT_INTV_DMSN. RPT_INTV_ID ORDER BY VAPS_RPT_INTV_DMSN. RPT_ID, VAPS_RPT_INTV_DMSN. RPT_INTV_ID) A2 AS (SELECT DISTINCT TAPS_REFERRALS_FACT. RPT_ID, TAPS_REFERRALS_FACT. DB2_UPDATE_DT, TAPS_REFERRALS_FACT. RPT_RECV_DT OF THE APS. TAPS_REFERRALS_FACT, APS. VAPS_RPT_CL_DMSN, APS. VAPS_RPT_CL_INTV_DMSN WHERE VAPS_RPT_CL_DMSN. RPT_ID = TAPS_REFERRALS_FACT. RPT_ID AND VAPS_RPT_CL_INTV_DMSN. RPT_CL_ID = VAPS_RPT_CL_DMSN. RPT_CL_ID AND TAPS_REFERRALS_FACT. EMRG_IND = '1') SELECT * FROM A1, A2 WHERE A1. RPT_INTV_ID = A2. RPT_INTV_ID
[/ code]
Thank you
Seyed
Right, A2 is not column named RPT_INTV_ID.
SY.
-
Select the case sensitive option: lack of keyword
Hi guys,.
I tried for awhile now all kinds of combinations, without him between the two, with him between, media, etc., nothing works.
I always get the error lack of keyword.
SELECT CASE salesprice
WHEN 0 THEN (salesprice + 20)
WHEN salesprice BETWEEN 0 AND 20 CAN (salesprice + 1,10)
ELSE (salesprice + 1.03)
Salesprice END as from the sale
would be great if one of you sees the error.Try:
select case when salesprice = 0 then (salesprice + 20) when salesprice between 0 and 20 then (salesprice + 1.10) else (salesprice + 1.03) end as salesprice from sales;
-
Could not commit: ORA-00928: lack of creating the table SELECT keyword
Hello guys.
I tried to create the table with web interface on oracle 11g.
I just follow this path on interface: schema-> table-> create-> standard (lot organized)-> SQl select on (set using the)->
and I just use these scripts to create the table:
CREATE TABLE suppliers
(the number (10) of supplier_id not null,)
supplier_name varchar2 (50) not null,
Contact_Name varchar2 (50)
);
but this error occurred: failed to commit: ORA-00928: lack of SELECT key word!
Please lock on this picture for more information: http://s17.postimg.org/kgoumzmvz/attachment.jpg
could you help me please?
and I could not find any manual for working with the web interface in oracle 11g.
Please give me somesources to start.
Thank you.1003778 wrote:
Thank you sybrand_b
but I already read this document.
Unfortunately, there is nothing on the creation of table with sql scripts in this document!and I really don't understand how to create table with SQL commands! My question has not yet been answered.
you please give me little details about it?
for example, how can create table using this sql command:CREATE TABLE suppliers
(the number (10) of supplier_id not null,)
supplier_name varchar2 (50) not null,
Contact_Name varchar2 (50)
);Thank you.
Edited by: 1003778 may 3, 2013 11:43
When you got to the CREATE TABLE screen, you have selected "set using the--> SQL.
Did you notice in the window that appears, just above this entry field is this text: "enter a SQL * select * statement below.» ' + This query results will be used to fill the table with Canada.* + "(underlining)
And hip, just to the left of this field is this text: «CREATE TABLE AS»He tries to build a ' CREATE TABLE AS SELECT... ». Creates a table with the same structure as the table in which you SELECT and fills with the results of this SELECT '. With your entry, you create a CREATE TABLE AS CREATE TABLE to read statement...
If you want to create your tables with a simple CREATE TABLE command, go to sqlplus and do it. You want to have a graphical interface to help build a simple CREATE table, when you get to the CREATE TABLE page, just to stay there with the default "use Define-> column specification." If you want, after completing "build" your table specification here, you will have a "Show sql" option to show you the actual sql statement that will be executed to create your table.
-
ORA-00928: lack of SELECT keyword
Hello
My version of oracle 9i, I need to use a dynamic array
I use the query but I'm below receive the error-ORA-00928: lack of SELECT keyword
declare
o_error_message VARCHAR2 (500);
l_query varchar2 (2000);
HEADER_TABLE VARCHAR2 (30);
BEGIN
Select TABLE_NAME in HEADER_TABLE
from sys.all_tables
where
Upper (table_name) = Upper ('cd_alloc_header_conv');
for r_allocconv in
(SELECT t.ORDER_NO
Of
shconv. CD_ORDER_CONV_TRACK t
WHERE
t.RMS_update_status = 'Y' AND
t.ALLOC_UPDATE_STATUS =' only)
loop
l_query: ='(insert en shconv.) CD_ALLOC_HDR_ACT_CONV (ALLOC_NO,
ORDER_NO,
WH,
SKU,
STATUS,
ALLOC_DESC,
PO_TYPE,
ALLOC_METHOD,
RELEASE_DATE,
ALLOC_TYPE,
ALLOC_RIB_STATUS,
CREATED_BY,
CREATE_DATE,
UPDATED_BY,
UPDATE_DATE,
CREATE_PGM_NAME,
ROW_ID,
EXCEPTION_DETAILS,
CONV_UPDATED_STATUS) select * from shconv.' | HEADER_TABLE | "WHERE order_no =' | r_allocconv.order_no |') ' ;
run immediately l_query;
END LOOP;
EXCEPTION
WHILE OTHERS THEN
o_error_message: = "error in CD_ALLOC_CONV_MAIN" | substr (SQLERRM, 1, 250);
dbms_output.put_line (o_error_message);
END;
ORA-00928: lack of SELECT keyword
Please suggestHello
990047 wrote:
...
l_query: ='(insert en shconv.) CD_ALLOC_HDR_ACT_CONV (ALLOC_NO,...
CONV_UPDATED_STATUS) select * from shconv.' | HEADER_TABLE | "WHERE order_no =' | r_allocconv.order_no |') ' ;
I don't think you want to Try parentheses
l_query := 'insert into shconv.CD_ALLOC_HDR_ACT_CONV(ALLOC_NO, ... CONV_UPDATED_STATUS) select * from shconv.' || HEADER_TABLE ||' WHERE order_no=' ||r_allocconv.order_no;
I wonder if you have the best table design for what you need.
Apparently, you have mulitple header_tables, who are all pretty similar. Would it not be simpler if you just had a header_table, with a column that distinguishes the lines that are now in separate tables? Her you wouldn't need dynamic SQL code at all. This work would be much simpler, more efficient and more robust.I hope that answers your question.
If this isn't the case, after a complete test script that people can run to recreate the problem and test their ideas. -
Hello
I try to extract the schema DDL to a base (10.2.0.4.0 - 64-bit Enterprise Edition on Solaris 10). I ran the query below and get an ORA-00907: parenthesis right absent error.
SELECT DBMS_METADATA. GET_DDL (REPLACE(object_type,' ','_') AS object_type, object_name) FROM user_objects WHERE object_type NOT IN ('TABLE_PARTITION', "INDEX_PARTITION", "LOB");
This is the output when executing the above in the sqlplus worksheet
Select DBMS_METADATA. GET_DDL (REPLACE (object_type, ", '_') as object_type, object_name) FROM user_objects if object_type in ('TABLE_PARTITION',"INDEX_PARTITION","LOB")
*
ERROR on line 1:
ORA-00907: lack of right parenthesis
remove the where the clause gives the following:
Select DBMS_METADATA. GET_DDL (REPLACE (object_type, ", '_') as object_type, object_name) FROM user_objects
*
ERROR on line 1:
ORA-00907: lack of right parenthesis
Pointers would be welcome. I know I could get the DDL using exp/imp, but I'd like to understand why I get the error of missing parenthesis.
see you soon,
EwanSELECT DBMS_METADATA. GET_DDL (REPLACE(object_type,' ','_') AS object_type, object_name) FROM user_objects WHERE object_type NOT IN
You don't need an alias here. Getting rid of the "as long as object_type' and it should work.
-
Hello
I create 2 APEX table with foreign key; the first table is OK, but in the second table, I get an error "ora-00905 keyword missing."
This is the statement:
"
-- -----------------------------------------------------
-Table "PATRIMONIO." 'SCHEDA_ANAGRAFICA '.
-- -----------------------------------------------------
CREATE TABLE SCHEDA_ANAGRAFICA (
ID_SCHEDA VARCHAR (20) NOT NULL ,
MUNICIPIO VARCHAR (45) NULL ,
ADDRESS VARCHAR (45) NULL ,
DIP_CONSEGANTARIO VARCHAR()45() NULL
DETAILS VARCHAR (45) NULL ,
TIPOLOGIA VARCHAR (45) NULL ,
DESCR_IMMOBILE VARCHAR()90) NULL
PRIMARY KEY (ID_SCHEDA) );
-- -----------------------------------------------------
-Table "PATRIMONIO." 'SCHEDA_AMMINISTRATIVA '.
-- -----------------------------------------------------
CREATE TABLE SCHEDA_AMMINISTRATIVA (
ID_SCHEDA VARCHAR (20) NOT NULL ,
DESCR_TRASFERIMENTO VARCHAR()45() NOT NULL
NOTA_TRASCRIZIONE VARCHAR()45() NULL
ASSEGNAZIONE VARCHAR (45) NULL ,
VERB_CONSEGNA VARCHAR (45) NULL ,
CONCESSIONE VARCHAR (45) NULL ,
NOTE VARCHAR (45) NULL ,
PRIMARY KEY ( )ID_SCHEDA DESCR_TRASFERIMENTO)
Fk_AMMINISTRATIVA_ANAGRAFICA of the CONSTRAINT
FOREIGN KEY (ID_SCHEDA)
REFERENCES SCHEDA_ANAGRAFICA ()ID_SCHEDA( )
WE REMOVE ANY ACTION
ON UPDATE NO ACTION );
"
I don't understand the cause.
Can you help me?
Thank you
5fd006d0-5573-4a0f-821a-63f2bd8083fd wrote:
Please update your forum profile with a real handle instead of '5fd006d0-5573-4a0f-821a-63f2bd8083fd '.
I create 2 APEX table with foreign key; the first table is OK, but in the second table, I get an error "ora-00905 keyword missing."
You create tables in the Oracle RDBMS, not by their SUMMIT. APEX is a development tool, not a database.
This is the statement:
"
-- -----------------------------------------------------
-Table "PATRIMONIO." 'SCHEDA_ANAGRAFICA '.
-- -----------------------------------------------------
CREATE TABLE SCHEDA_ANAGRAFICA)
ID_SCHEDA VARCHAR (20) NOT NULL,
NULL IN MUNICIPIO OF VARCHAR (45).
ADDRESS VARCHAR (45) NULL,
DIP_CONSEGANTARIO VARCHAR (45) NULL,
DETAILS VARCHAR (45) NULL,
TIPOLOGIA VARCHAR (45) NULL,
DESCR_IMMOBILE VARCHAR (90) NULL,
PRIMARY KEY (ID_SCHEDA));
-- -----------------------------------------------------
-Table "PATRIMONIO." 'SCHEDA_AMMINISTRATIVA '.
-- -----------------------------------------------------
CREATE TABLE SCHEDA_AMMINISTRATIVA)
ID_SCHEDA VARCHAR (20) NOT NULL,
DESCR_TRASFERIMENTO VARCHAR (45) NOT NULL,
NOTA_TRASCRIZIONE VARCHAR (45) NULL,
ASSEGNAZIONE VARCHAR (45) NULL,
VERB_CONSEGNA VARCHAR (45) NULL,
CONCESSIONE VARCHAR (45) NULL,
NOTE VARCHAR (45) NULL,
PRIMARY KEY (ID_SCHEDA, DESCR_TRASFERIMENTO).
CONSTRAINT fk_AMMINISTRATIVA_ANAGRAFICA
FOREIGN KEY (ID_SCHEDA)
REFERENCES SCHEDA_ANAGRAFICA (ID_SCHEDA)
ON DELETE NO ACTION
UPDATE NO ACTION);
"
I don't understand the cause.
Ni NO ACTION or ON UPDATE are valid in a REFERENCES clause in Oracle. If you want to default to make referential integrity checks can remove these clauses. The only other options are ON DELETE CASCADE/SET NULL.
Maybe you are looking for
-
iPhone 6 error 53 and APPLE DOES NOT REPLACE FIX GOLD!
I bought my iphone from Apple 6 January 10th, 2015 in Dubai. I dropped my iphone in February and the upper part of the iphone (above the display) got a minute crack. It wasn't any of of replacement in India if I had no choice but to use the iphone an
-
Mouse events do not work on a button in a panel ran into a DLL
Hello. I have a DLL that loads a Panel. Since it is a DLL I can't do the RunUserInterface() function because the DLL would be stuck waiting for the events of Panel. I don't the LoadPanel(). When I click with the mouse on one of the buttons, pushing i
-
Error after upgrading network controller
I upgraded to 8.1 Windows pro 64-bit on my HP divide x 2, and network controller has now no driver, as well as another device. I don't know where to find the drivers for the latter. Network controller: PCI\VEN_8086 & DEV_08B3 & SUBSYS_00708086 & REV_
-
Hide elements of punch out?
HelloWe want to hide some elements of a punch out. This PunchOut is hosted by our provider.What is the best way to do it.We plan to remove the mapping in e-Commerce Gateway > code of the Conversion values.We need hide these items temporarily i.e. for
-
Characters look plasticky in Photoshop CC 2015.1
HelloI downloaded .dae Mixamo Web site format and tried to open the file in Photoshop CC 2015.1.Some of the characters seems well in the 3D workspace, however some characters have an appearance of plastic wrapped around them. These characters also ha