General SQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsDatabasesGeneral SQL 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:
  #1  
Old April 30th, 2004, 04:36 PM
zishto zishto is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Posts: 8 zishto 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

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 ...

Reply With Quote
  #2  
Old May 4th, 2004, 01:39 AM
michlmann michlmann is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2004
Posts: 56 michlmann User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
The error is in line 9:

RESTURANT_BILL NUMBER(7) NUT NULL,

should be

RESTURANT_BILL NUMBER(7) NOT NULL,

instead.

Reply With Quote
  #3  
Old May 5th, 2004, 02:35 AM
zishto zishto is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Posts: 8 zishto User rank is Just a Lowly Private (1 - 20 Reputation Level) 
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

Reply With Quote
  #4  
Old May 12th, 2004, 02:49 AM
cherryplo cherryplo is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: May 2004
Posts: 1 cherryplo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Unhappy 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

Reply With Quote
  #5  
Old May 14th, 2004, 01:24 PM
michlmann michlmann is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2004
Posts: 56 michlmann User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
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)
  )
 )
 /
 

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesGeneral SQL Development > ORA-00922: missing or invalid option


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
Stay green...Green IT