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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Help with SQL script

Re: Help with SQL script

From: Paul <paul_at_see.my.sig.com>
Date: Wed, 27 Jul 2005 11:00:48 +0100
Message-ID: <ckmee11n20bkglvoj5mfg4aigj0otkdivu@4ax.com>

"Squid" <exceldude2001_at_yahoo.com> wrote:

>Here is the script output after I run the scripts:
>SQL> @createtables.sql
>CREATE TABLE CustType(
> *
>ERROR at line 1:
>ORA-00955: name is already used by an existing object

Does it already exist? Can you log on as sysdba and check the all_tables view?

Drop it it already exists.

>constraint FKCustNum foreign key(CustNum)
> *
>ERROR at line 8:
>ORA-02264: name already used by an existing constraint

ditto.

>CREATE TABLE Packing List(
> *
>ERROR at line 1:
>ORA-00922: missing or invalid option

As Sybrand says, you are using a space in the object name. You have to use quotes to do this, but I would *_strongly_* advise that you don't.

  1. it makes your code non_portable.
  2. you always have to rememeber to quote the name

Use underscore - Packing_List or just PackingList.

Paul...

-- 

plinehan __at__ yahoo __dot__ __com__

XP Pro, SP 2, 

Oracle, 9.2.0.1.0 (Enterprise Ed.)
Interbase 6.0.1.0;

When asking database related questions, please give other posters 
some clues, like operating system, version of db being used and DDL.
The exact text and/or number of error messages is useful (!= "it didn't work!").
Thanks.
 
Furthermore, as a courtesy to those who spend 
time analysing and attempting to help, please 
do not top post.
Received on Wed Jul 27 2005 - 05:00:48 CDT

Original text of this message

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