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

Home -> Community -> Usenet -> c.d.o.server -> Re: Beginner create table question

Re: Beginner create table question

From: Ivars Grinbergs <ivarsg_at_itsystems.lv>
Date: 1997/11/22
Message-ID: <3476CB33.ED6A1258@itsystems.lv>#1/1

drichardson wrote:

> Hello,
>
> I am new to Oracle and I need to create a simple table, but when I attempt
> to create the table I get an invalid object (I think its object) error in
> line 3:
>
> create table SALESOUT (
> 2 Disti CHAR(50),
> 3 Date DATE,
> 4 Period NUMBER,
> 5 Sales Out NUMBER(9,2),
> 6 Bookings NUMBER(9,2),
> );
>
> Can someone look at my code and tell me if it is incorrect, I would really
> appreciate it.
>
> Thanks in advance,
>
> Dave

Dave,

'date' is reserved word in SQL :(
So you have to change column's name to something different from 'Date', like out_date.
More comments, you cannot use space in column name the way you do this, you must include your column in '"', e.g. "Sales Out". Note, that in such case you will always need to refer to this object using name in '"', for instance, SQL statement 'select salesout."Sales Out" from salesout' will be correct while 'select salesout."sales out" from salesout' NOT!

Have a luck,
I.Grinbergs Received on Sat Nov 22 1997 - 00:00:00 CST

Original text of this message

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