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

    Join Date
    Jul 2012
    Posts
    8
    Rep Power
    0

    Help with sql table


    Hi i need help creating a sql table im getting error " ORA-00907: missing right parenthesis"

    CREATE TABLE Campaign
    (campaign_id NUMBER(5) PRIMARY KEY,
    Account VARCHAR(20) NOT NULL,
    SalesLead ID,
    SCLead ID,
    Country ID,
    Region ID+R,
    Vertical ID,
    Discovery VARCHAR(30) NOT NULL,
    GCM_Oppty VARCHAR(10) NOT NULL,
    GCM_Status VARCHAR(10) NOT NULL,
    Ranking NUMBER(1),
    Comments VARCHAR(80) NOT NULL,
    Next_Steps VARCHAR(10) NOT NULL,
    HW VARCHAR(10) NOT NULL,
    OS VARCHAR(10) NOT NULL,
    DB VARCHAR(10) NOT NULL);


    the problem is "ID" and "ID+R", i need these to conect with other sql tables
  2. #2
  3. Lord of the Dance
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Oct 2003
    Posts
    3,673
    Rep Power
    1958
    Were did you find the ID and ID+R? Those types does not exists, at least not with MySql.
    For valid (data) types you should look at the manual:
    http://dev.mysql.com/doc/refman/5.1/en/create-table.html

    To "conect with other sql tables" I suggest you take a look at foreign keys:
    http://dev.mysql.com/doc/refman/5.5/en/innodb-foreign-key-constraints.html

    If this does not help, then please explain more specific what you goal is.
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2012
    Posts
    8
    Rep Power
    0
    http:// s10.postimage. o r g/gx8a32phl/image.jpg

    heres the picture of the database model, let me know if that helps u
  6. #4
  7. Lord of the Dance
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Oct 2003
    Posts
    3,673
    Rep Power
    1958
    You have three tables each with a fieldname called "ID", but no data type for it?

    In MySql, it is possible to create an auto-increment integer, maybe this is what you need?
    http://dev.mysql.com/doc/refman/5.0/en/example-auto-increment.html

    Did you look at the links in my previous post?
  8. #5
  9. SQL Consultant
    Devshed Supreme Being (6500+ posts)

    Join Date
    Feb 2003
    Location
    Toronto Canada
    Posts
    27,212
    Rep Power
    4279
    Originally Posted by sanjit
    ... error " ORA-00907: missing right parenthesis"
    sanjit, please confirm, are you using mysql? or oracle?
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
  10. #6
  11. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2012
    Posts
    8
    Rep Power
    0
    Originally Posted by r937
    sanjit, please confirm, are you using mysql? or oracle?
    Im using apex so its oracle?
  12. #7
  13. Hockey face
    Devshed Supreme Being (6500+ posts)

    Join Date
    Nov 2001
    Location
    St. Catharines, Canada
    Posts
    8,147
    Rep Power
    1316
    Then you need to post in the correct forum.
    Thread moved to Oracle forum.
  14. #8
  15. No Profile Picture
    Contributing User
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Jan 2006
    Location
    Carlsbad, CA
    Posts
    2,057
    Rep Power
    383
    Same issue in Oracle forum.
    Where did you get your column types of ID and (the highly unusual) ID+R?

IMN logo majestic logo threadwatch logo seochat tools logo