Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

"ORA-00904 invalid identifier", what's wrong?

Adam1902Apr 28 2014 — edited Apr 28 2014

Hey,

I'm trying to create 4 very basic tables (via Script Editor) in Application Express 4.1.0.00.32 and keep getting this error and can't understand why. If anyone else can point out where I'm going wrong that'd be perfect!

Here's the script:

----------

DROP TABLE County CASCADE CONSTRAINTS;

DROP TABLE City CASCADE CONSTRAINTS;

DROP TABLE Offence CASCADE CONSTRAINTS;

DROP TABLE Region CASCADE CONSTRAINTS;


CREATE TABLE County(

    County_Name VARCHAR2(55) PRIMARY KEY,

    Location VARCHAR2(55),

    Details VARCHAR2(222));


CREATE TABLE Offence(

    Offence_ID NUMBER(3) PRIMARY KEY,

    Offence_Desc VARCHAR2(333),

    Offence_Type VARCHAR2(111) NOT NULL,

    Date DATE NOT NULL,

    Time NUMBER(5),

    County_Name VARCHAR2(55) REFERENCES County(County_Name),

    City_Name VARCHAR2(55) REFERENCES City(City_Name),

    Region_Name VARCHAR2(55) REFERENCES Region(Region_Name));


CREATE TABLE City(

    County_Name VARCHAR2(55) REFERENCES County(County_Name),

    City_Name VARCHAR2(55) PRIMARY KEY,

    PostCode VARCHAR(8) NOT NULL,

    House# NUMBER(3) NOT NULL,

    Street VARCHAR2(55),

    Town VARCHAR2(55),

    Building_Name VARCHAR2(55));

   

CREATE TABLE Region(

    Region_Name VARCHAR2(55) PRIMARY KEY,

    City VARCHAR2(55) NOT NULL,

    Est_Population NUMBER(9) NOT NULL);

-----------


The error I'm getting in the summary when I run the script is:

"60.00CREATE TABLE Offence( Offence_ID NUMBER(3) PRIMARY KEY, ORA-00904: : invalid identifier"

So I'm assuming it's related to the "Offence_ID" line (intended as the primary key / identifier), but I can't see an issue.

Any assistance greatly appreciated!

This post has been answered by RobbR on Apr 28 2014
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 26 2014
Added on Apr 28 2014
3 comments
2,749 views