SunQuest
           Oracle Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesOracle Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here!
  #1  
Old April 23rd, 2004, 11:48 AM
zishto zishto is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Posts: 3 zishto User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
error with a table ???

hi all ...

i am working on a hotel reservation system ...

i finished the design and am working on the coding now ...

the problem is SQL is giving me error massage where is no error !!!
i have search in the net but couldnt find anything

here is the table that gives me error


SQL> CREATE TABLE GUEST_ROOM
2 (
3 ROOM_NO NUMBER(3),
4 RESERVATION_NO NUMBER(5),
5 GUEST_NUMBER NUMBER(5) ,
6 ACTUAL_CHECKIN_DATE DATE NOT NULL,
7 ACTUAL_CHECKOUT_DATE DATE NOT NULL ,
8 CONSTRAINT ROOM_NO_FK FOREIGN KEY
9 REFERENCES ROOM_NO (ROOM_NO),
10 CONSTRAINT ROOM_RESERVATION_NO_FK FOREIGN KEY (RESERVATION_NO)
11 REFERENCES RESERVATION (RESERVATION_NO),
12 CONSTRAINT ROOM_GUEST_NUMBER_FK FOREIGN KEY (GUEST_NUMBER)
13 REFERENCES GUEST (GUEST_NUMBER)
14 );
REFERENCES ROOM_NO (ROOM_NO),
*
ERROR at line 9:
ORA-00906: missing left parenthesis

i am attaching all the tables if anyonw interested in helping me

thanks and regards...
Attached Files
File Type: doc hotel_Reservation.doc (32.5 KB, 165 views)

Reply With Quote
  #2  
Old April 23rd, 2004, 12:31 PM
utecistu utecistu is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 16 utecistu User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Lightbulb first give credit to oracle then to google ;)

at line 8 after "FOREIGN KEY" add "(ROOM_NO)"

Reply With Quote
  #3  
Old April 23rd, 2004, 06:20 PM
shammat shammat is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Oct 2003
Location: Munich, Bavaria
Posts: 971 shammat User rank is Second Lieutenant (5000 - 10000 Reputation Level)shammat User rank is Second Lieutenant (5000 - 10000 Reputation Level)shammat User rank is Second Lieutenant (5000 - 10000 Reputation Level)shammat User rank is Second Lieutenant (5000 - 10000 Reputation Level)shammat User rank is Second Lieutenant (5000 - 10000 Reputation Level)shammat User rank is Second Lieutenant (5000 - 10000 Reputation Level)shammat User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 1 Week 2 Days 17 h 44 m 15 sec
Reputation Power: 57
Just a side note: are you sure your hotels will never have more then 999 rooms?

Reply With Quote
  #4  
Old April 24th, 2004, 12:48 AM
dhananjayshetty dhananjayshetty is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2004
Posts: 24 dhananjayshetty User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 33 m 16 sec
Reputation Power: 0
foreing key.

hi,

you were missing the references table name.

try this,

create table guest_room
(
room_no number(3),
reservation_no number(5),
guest_no number(5),
act_checkin_date date not null,
act_checkout_date date not null,
constraint fk_room_no foreign key(room_no) references room_details(room_no),
constraint fk_reservation_no foreign key(reservation_no) reservation_details(reservation_no),
constraint fk_room_guest_no foreign key(guest_no) references guest_details(guest_no)
)
/

bye..............

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesOracle Development > error with a table ???


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 2 hosted by Hostway