Database Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsDatabasesDatabase Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old January 16th, 2005, 10:39 AM
mad_bhu mad_bhu is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2005
Posts: 3 mad_bhu User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
ora-00922; MISSING OR INVALID OPTION ERROR

Hi,
I want to create a table with the following code on oracle 9i. I am getting the error ORA-00922; missing or invalid option.
I guess something is wrong with the code. Could anypne help me on this.
thanks in adv

create table Emp_performance (
perform_empno number(10),
assess_year date,
organization_id varchar2(20),
existing_level varchar2(20),
present_pot varchar2(20),
max_pot_fut_level varchar2(20),
people_lead_pot varchar2(10),
team_lead varchar2(100),
constraint pkempperformance primary key(assess_year,perform_empno),
constraint fkempperformance foriegn key perform_empno references team_mem_info(emp_no)
on delete cascade );

Reply With Quote
  #2  
Old January 16th, 2005, 11:54 AM
Madpawn Madpawn is offline
My beat is correct.
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2004
Posts: 339 Madpawn User rank is Private First Class (20 - 50 Reputation Level)Madpawn User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 2 Days 22 h 3 m 33 sec
Reputation Power: 4
Do you need a comma between your foreign key declaration and the on delete?

Reply With Quote
  #3  
Old January 16th, 2005, 01:09 PM
mad_bhu mad_bhu is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2005
Posts: 3 mad_bhu User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Unhappy Re:

Quote:
Originally Posted by Madpawn
Do you need a comma between your foreign key declaration and the on delete?


No, That doesn't work either

Reply With Quote
  #4  
Old January 16th, 2005, 01:43 PM
mad_bhu mad_bhu is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2005
Posts: 3 mad_bhu User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
oh, it was the spelling of foreign!

Reply With Quote
  #5  
Old April 14th, 2005, 10:03 AM
Jean Wang Jean Wang is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2005
Posts: 1 Jean Wang User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 m 29 sec
Reputation Power: 0
there are two errors



Hi,



I have tried your code on Oracle 9i and found there are two errors in it:

1. The word “foriegn” is a wrong spelling word.

2. You should add parenthesis() for foreign key perform_empno as below



constraint fkempperformance foreign key(perform_empno) references team_mem_info(emp_no) on delete cascade );


The result is shown as below:

SQL> @create_emp_performance.sql;

Table created.

SQL> desc Emp_performance;
Name Null? Type
----------------------------------------- -------- ----------------------------
PERFORM_EMPNO NOT NULL NUMBER(10)
ASSESS_YEAR NOT NULL DATE
ORGANIZATION_ID VARCHAR2(20)
EXISTING_LEVEL VARCHAR2(20)
PRESENT_POT VARCHAR2(20)
MAX_POT_FUT_LEVEL VARCHAR2(20)
PEOPLE_LEAD_POT VARCHAR2(10)
TEAM_LEAD VARCHAR2(100)


You could try it again! Good luck!


Jean Wang

Reply With Quote
  #6  
Old May 17th, 2005, 08:04 AM
r_bharath1 r_bharath1 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: May 2005
Posts: 1 r_bharath1 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 m 22 sec
Reputation Power: 0
ORA - 0922 while using Dynamic SQL's

Hi All,
The below mentioned query gives ora 0922 error..
l_select_query1 :='create table temp001 no logging as

select distinct return_line_id from cor_return_line@rcomdb'
;

l_select_query2 :='union all select distinct return_line_id from cor_return_line_tax_record@rcomdb';

execute immediate(l_select_query1||' '||l_select_query2);
But if I remove No Logging it works fine.Pls help


Reply With Quote
  #7  
Old May 20th, 2008, 09:43 PM
villero villero is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: May 2008
Posts: 1 villero User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 16 m 38 sec
Reputation Power: 0
ORA-00922: missing or invalid option

Hi,
I want to create a table with the following code on oracle 3.3. I am getting the error ORA-00922; missing or invalid option.
I guess something is wrong with the code. Could anyone help me on this.
thanks in adv


SQL> CREATE TABLE Usuario
2 (Id_usuario VARCHAR2(30),
3 Nom_usuario VARCHAR2(50) NOT NULL,
4 Id_departamento NUMBER NOT NULL,
5 Id_grupo NUMBER NOT NULL,
6 Estado VARCHAR2(1) DEAFAULT 'A' NOT NULL
7 CONSTRAINT ck_Estado_Usuario
8 check (Estado in('A','I')),
9 CONSTRAINT pk_Usuario PRIMARY KEY (Id_usuario),
10 CONSTRAINT fk1_usuario FOREIGN KEY (Id_departamento)
11 REFERENCES Departamento (Id_departamento),
12 CONSTRAINT fk2_Usuario FOREIGN KEY (Id_grupo)
13 REFERENCES Grupo_usuario (Id_grupo)));
(Id_usuario VARCHAR2(30),
*
ERROR at line 2:
ORA-00922: missing or invalid option

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesDatabase Development > ora-00922; MISSING OR INVALID OPTION ERROR


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway