|
 |
|
Dev Articles Community Forums
> Databases
> General SQL Development
|
ORA-00922: missing or invalid option
Discuss ORA-00922: missing or invalid option in the General SQL Development forum on Dev Articles. ORA-00922: missing or invalid option General SQL Development forum to discuss Oracle, PostgreSQL, and platform independent SQL related questions. Learn to utilize the power of SQL to manipulate relational databases.
|
|
 |
|
|
|
|

Dev Articles Community Forums Sponsor:
|
|
|

April 30th, 2004, 04:36 PM
|
|
Registered User
|
|
Join Date: Jan 2004
Posts: 8
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
ORA-00922: missing or invalid option
hi all ...
here is a new problem for u to solve...
am trying to add this table to the data base
but it gives me the following error
ERROR at line 2:
ORA-00922: missing or invalid option
this is the table ...
CREATE TABLE BILL
(
BILL_NO NUMBER NOT NULL,
GUEST_NUMBER NUMBER(5),
ROOM_NO NUMBER(3),
BILL_DATE DATE NOT NULL,
RATE NUMBER(7)NOT NULL,
TELEPHONE_BILL NUMBER(7)NOT NULL,
RESTURANT_BILL NUMBER(7) NUT NULL,
SERVIES_BILL NUMBER(7)NOT NULL,
CONSTRAINT BILLS_GUEST_NUMBER_FK FOREIGN KEY (GUEST_NUMBER)
REFERENCES CUSTOMERS_INFO (GUEST_NUMBER),
CONSTRAINT BILL_ROOM_NO_FK FOREIGN KEY (ROOM_NO)
REFERENCES ROOM_NO(ROOM_NO)
);
can u help me with it plZ ...
thanks and regards ...
|

May 4th, 2004, 01:39 AM
|
|
Contributing User
|
|
Join Date: Mar 2004
Posts: 56
Time spent in forums: < 1 sec
Reputation Power: 10
|
|
|
The error is in line 9:
RESTURANT_BILL NUMBER(7) NUT NULL,
should be
RESTURANT_BILL NUMBER(7) NOT NULL,
instead.
|

May 5th, 2004, 02:35 AM
|
|
Registered User
|
|
Join Date: Jan 2004
Posts: 8
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
thanks a million for ur help ...it was such a silly mistake which i always fall into ....  it works now ...
regards
|

May 12th, 2004, 02:49 AM
|
|
Registered User
|
|
Join Date: May 2004
Posts: 1
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
ORA-00922: missing or invalid option
somebody please help me with this problem where is the
erorr(I can't find it )please reply me
1 create table articol(
2 cod_a varchar2(3),nume_a varchar2(15),pret_a number(7)
3 durata number(4) constraint
4 durata_ck check(cod_a in substring (cod_a,1,1)=(c,b,a) and durata=0)
5 or check(cod_a in 's%' substring(cod_a,1,1) and durata<3)
6 or check(cod_a in 'p%' substring(cod_a,1,1) and durata>9 and pret_a>15000)
7* )
SQL> /
create table articol(
*
ERROR at line 1:
ORA-00922: missing or invalid option
|

May 14th, 2004, 01:24 PM
|
|
Contributing User
|
|
Join Date: Mar 2004
Posts: 56
Time spent in forums: < 1 sec
Reputation Power: 10
|
|
Lot's of errors in your statement. Perhaps the following is what you want:
Code:
CREATE TABLE articol(
cod_a VARCHAR2(3) NOT NULL,
nume_a VARCHAR2(15),
pret_a NUMBER(7),
durata NUMBER(4),
CONSTRAINT durata_ck CHECK
(
(substr(cod_a,1,1) in ('c','b','a') and durata=0) or
(substr(cod_a,1,1)='s' and durata<3) or
(substr(cod_a,1,1)='p' and durata>9 and pret_a>15000)
)
)
/
|

September 18th, 2012, 11:25 AM
|
|
Registered User
|
|
Join Date: Sep 2012
Posts: 1
Time spent in forums: 36 m 32 sec
Reputation Power: 0
|
|
ORA-00922: missing or invalid option
hi
here is my code
plz help me out to solve this
CREATE TABLE ADMISSION_FORM (
SL_NO NUMBER(3) NOT NULL AUTO_INCREMENT,
CLASS CLASS_TYPE,
SNAME VARCHAR2(30) NOT NULL,
DOB DATE,
AGE NUMBER(2),
GENDER SEX_TYPE,
PRE_INSTI VARCHAR2(40),
FNAME VARCHAR2(20) NOT NULL,
MNAME VARCHAR2(20) NOT NULL,
LADDR LOCALADDR_TYPE,
PADDR PERMANENTADDR_TYPE,
FQUALI VARCHAR2(15),
MQUALI VARCHAR2(15),
RELIGION VARCHAR2(20) NOT NULL,
NATIONALITY VARCHAR2(10) NOT NULL,
OCCUP VARCHAR2(20) NOT NULL,
PHY_DISAB CHAR(1) CHECK (PHY_DISAB IN ('Y','y','N','n')),
IDNMRK VARCHAR2(30))
CREATE TABLE ADMISSION_FORM (
*
ERROR at line 1:
ORA-00922: missing or invalid option
|

September 19th, 2012, 03:10 AM
|
|
Registered User
|
|
Join Date: Sep 2012
Posts: 7
Time spent in forums: 7 m 54 sec
Reputation Power: 0
|
|
|

September 20th, 2012, 01:20 PM
|
|
Registered User
|
|
Join Date: Jun 2012
Posts: 11
Time spent in forums: 1 h 56 m 23 sec
Reputation Power: 0
|
|
Quote: | Originally Posted by AjoyA hi
plz help me out to solve this
ERROR at line 1:
ORA-00922: missing or invalid option |
Try doing the create with the standard types:
Code:
CREATE TABLE ADMISSION_FORM (
SL_NO NUMBER(3) NOT NULL AUTO_INCREMENT,
/* CLASS CLASS_TYPE,*/
SNAME VARCHAR2(30) NOT NULL,
DOB DATE,
AGE NUMBER(2),
/* GENDER SEX_TYPE,*/
PRE_INSTI VARCHAR2(40),
FNAME VARCHAR2(20) NOT NULL,
MNAME VARCHAR2(20) NOT NULL,
/* LADDR LOCALADDR_TYPE,*/
/* PADDR PERMANENTADDR_TYPE,*/
FQUALI VARCHAR2(15),
MQUALI VARCHAR2(15),
RELIGION VARCHAR2(20) NOT NULL,
NATIONALITY VARCHAR2(10) NOT NULL,
OCCUP VARCHAR2(20) NOT NULL,
PHY_DISAB CHAR(1) CHECK (PHY_DISAB IN ('Y','y','N','n')),
IDNMRK VARCHAR2(30))
If this works, drop the table, and try again, this time uncomment one of the fields with your own type definition. Repeat this, until you find which fields fails.
Now you check that the definition of this field is done correctly (or post the code for creation of the type definitions, and we will try helping).
|

November 14th, 2012, 01:23 AM
|
|
Registered User
|
|
Join Date: Nov 2012
Posts: 6
Time spent in forums: 10 m 15 sec
Reputation Power: 0
|
|
|
Developer Shed Advertisers and Affiliates
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|