Cosmo (Cosmo@Frontier.Com) wrote:
: Hello everybody,
:    I am trying to insert data into a table, keep getting an error message
: that says:
:  error at line ... .
: ORA-00984: column not allowed
: I am fairly new an don't understand why column not allowed. I am using
: Oracle 7 server release 7.2.3.0.0
: Any ideas will greatly appreciated, and sorry for the beginner stuff !
:                        Mahmoud
: 
: Here is the definition of the table which is a part of several tables in my
: schema.
: create table consultant
: (
:  cid            NUMBER(5)
: ,cname          VARCHAR2(15)
: ,cssn           NUMBER(9)  PRIMARY KEY
: ,cphone         NUMBER(10)
: ,chrate         NUMBER(5)
: ,pname          VARCHAR2(15)
: ,hours          NUMBER(10)
: , FOREIGN KEY(cid) REFERENCES address(cid)
: )

The lines above should read
,hours         NUMBER(10
) FOREIGN KEY(cid) REFERENCES address(cid)

The table was created improperly.
-Ari Kaplan
Independent Oracle DBA Consultant

<-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><->
<-> For 125+ Oracle tips, visit my Web Page:                      <->
<->                                                               <->
<->             www.arikaplan.com                                 <->
<->                                                               <->
<->             email: akaplan@interaccess.com                    <->
<-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><->




: Here are part of the insertion sql*plus commands:
: accept  ssn number -
: prompt "enter consultant social security number(required): "
: accept  consid number -
: prompt "enter consultant id number: "
: accept  name char -
: prompt "enter consultant name: "
: accept  phone number -
: prompt "enter consultant phone number: "
: accept  rate number -
: prompt "enter consultant hourly rate: "
: accept  prname char -
: prompt "enter project name: "
: accept  whours number -
: prompt "enter hours worked: "
: insert into client(cid) values(&consid);
: insert into consultant(cid,cname,cssn,cphone,chrate,pname,hours)
:                  values(&consid,&name,&ssn,&phone,&rate,&prname,&whours) ;
: 
: 
: 
: 
: 

Back to Ari Kaplan's Home Page ">Back to Ari Kaplan's Home Page