The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.
|
 |
|
Dev Shed Forums
> Databases
> Oracle Development
|
Help with sql table
Discuss Help with sql table in the Oracle Development forum on Dev Shed. Help with sql table Oracle Development forum discussing administration, Oracle queries, and other Oracle-related topics. Oracle is known as one of the most robust multi-platform relational databases available.
|
|
 |
|
|
|
|

Dev Shed Forums Sponsor:
|
|
|

July 30th, 2012, 08:42 AM
|
|
Registered User
|
|
Join Date: Jul 2012
Posts: 8
Time spent in forums: 1 h 40 m 37 sec
Reputation 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
|

July 30th, 2012, 09:00 AM
|
 |
Lord of the Dance
|
|
|
|
|
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.
|

July 30th, 2012, 09:08 AM
|
|
Registered User
|
|
Join Date: Jul 2012
Posts: 8
Time spent in forums: 1 h 40 m 37 sec
Reputation 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
|

July 30th, 2012, 09:15 AM
|
 |
Lord of the Dance
|
|
|
|
|
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?
|

July 30th, 2012, 11:20 AM
|
 |
SQL Consultant
|
|
Join Date: Feb 2003
Location: Toronto Canada
|
|
Quote: | Originally Posted by sanjit ... error " ORA-00907: missing right parenthesis" | sanjit, please confirm, are you using mysql? or oracle?
|

July 30th, 2012, 12:52 PM
|
|
Registered User
|
|
Join Date: Jul 2012
Posts: 8
Time spent in forums: 1 h 40 m 37 sec
Reputation Power: 0
|
|
Quote: | Originally Posted by r937 sanjit, please confirm, are you using mysql? or oracle? |
Im using apex so its oracle?
|

July 30th, 2012, 01:24 PM
|
 |
Hockey face
|
|
Join Date: Nov 2001
Location: St. Catharines, Canada
|
|
Then you need to post in the correct forum.
Thread moved to Oracle forum.
|

July 30th, 2012, 02:15 PM
|
|
Contributing User
|
|
Join Date: Jan 2006
Location: Carlsbad, CA
|
|
|
Same issue in Oracle forum.
Where did you get your column types of ID and (the highly unusual) ID+R?
|
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
|
|
|
|
|