Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: error on simple table create?

Re: error on simple table create?

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Wed, 30 May 2001 23:31:27 +0200
Message-ID: <thapheq84ndj21@beta-news.demon.nl>

"Phil R Lawrence" <prlawrence_at_lehigh.edu> wrote in message news:9f3n7l$ges_at_fidoii.CC.Lehigh.EDU...
> I am recieving an error for the following simple table create SQL:
> ----------------------------------------------
> drop table FIMSMGR.FWBROEB;
> drop sequence fwbroeb_number;
> create sequence fwbroeb_number increment by 1 start with 100000;
> create table FIMSMGR.FWBROEB
> (
> FWBROEB_ID number(10)
 CONSTRAINT pk_fwbroeb PRIMARY KEY,
> DESC varchar2(35)
 NOT NULL,
> TYPE number(2)
 CONSTRAINT check_type
>

 CHECK (type IN ('A','B','D','E','Z','EB','AF','IN'))
>

 NOT NULL,
> METHOD varchar2(3)
 CONSTRAINT check_method
>

 CHECK (method IN ('MTD','YTD')),
> DOL_AMT number(9,2),
> PERCENTAGE number(6,5),
> DR_INDEX varchar2(6)
 NOT NULL,
> CR_INDEX varchar2(6)
 NOT NULL,
> DR_ACCT_CODE varchar2(6),
> CR_ACCT_CODE varchar2(6),
> ATTRIBUTE_TYPE varchar2(8),
> ATTRIBUTE_VALUE varchar2(8),
> BASE_INDEX_FOR_PARSING varchar2(13),
> ACTIVE_IND varchar2(1)
 CONSTRAINT check_active_ind
>

 CHECK (active_ind IN ('Y','N')),
> DATE_BEGIN date
 NOT NULL,
> DATE_END date,
> PERSON_RESPONSIBLE_1 varchar2(30)
 NOT NULL,
> PERSON_RESPONSIBLE_2 varchar2(30),
> NOTE_RULE_TYPE varchar2(20),
> NOTE_FOLLOW_UP varchar2(20),
> NOTE varchar2(500)
> );
> ----------------------------------------------
>
> Here is the error:
> ----------------------------------------------
> SQL> @cr_ROE_tables_test
> drop table FIMSMGR.FWBROEB
> *
> ERROR at line 1:
> ORA-00942: table or view does not exist
>
>
>
> Sequence dropped.
>
>
> Sequence created.
>
> Input truncated to 2 characters
> DESC varchar2(35)
 NOT NULL,
> *
> ERROR at line 4:
> ORA-00904: invalid column name
> ----------------------------------------------
>
> I believe I have the PRIMARY KEY syntax right... does anyone see what the
 problem is?
>
> Thanks,
> Phil R Lawrence
>
>

DESC is a reserved word. It looks like changing it to DESCR will resolve the issue.

Hth,

Sybrand Bakker, Oracle DBA Received on Wed May 30 2001 - 16:31:27 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US