#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2012
    Posts
    11
    Rep Power
    0

    Missing Right Parenthesis


    Hello, this is my first time posting and I hope I'm doing this right. I'm working on my database homework, and I came across an error that I cannot seem to fix. I'm getting a missing right parenthesis error on line 7, but I seem to have all my parenthesis, endless I'm overlooking one. I will appreciate any help I can get. Thank you.

    Code:
     DROP TABLE RoomDM CASCADE CONSTRAINTS PURGE; 
     1 CREATE TABLE RoomDM ( 
     2    rNo          VARCHAR(4), 
     3    hNo          NUMBER(3), 
     4    type         CHAR(6)                 NOT NULL, 
     5    price        NUMBER(3,2)             NOT NULL, 
     6 CONSTRAINT RoomDM_PK PRIMARY KEY (rNo, hNo), 
     7 CONSTRAINT RoomDM_hNo_FK FOREGIN KEY (hNo)         
     8                           REFERENCES HotelDM (hNo) ON DELETE CASCADE, 
     9 CONSTRAINT RoomDM_type_CK CHECK(type IN(‘Single’, ‘Double’, ‘Family’)) 
    10 );
    The error looks like this:
    Code:
    CONSTRAINT RoomDM_hNo_FK FOREGIN KEY (hNo) 
                                         * 
    ERROR at line 7: 
    ORA-00907: missing right parenthesis
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Oct 2003
    Location
    Germany
    Posts
    2,788
    Rep Power
    349
    FOREGIN KEY should be FOREIGN KEY
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2012
    Posts
    11
    Rep Power
    0
    Thank you so much. I was so focused on the parenthesis that I missed it!

IMN logo majestic logo threadwatch logo seochat tools logo