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: no semicolon in SQL*PLUS

Re: no semicolon in SQL*PLUS

From: Niall Litchfield <niall.litchfield_at_dial.pipex.com>
Date: Thu, 31 Oct 2002 15:42:32 -0000
Message-ID: <3dc14f61$0$1294$cc9e4d1f@news.dial.pipex.com>


"Brian Peasland" <oracle_dba_at_peasland.com> wrote in message news:3DC13B70.F7CBB1CC_at_peasland.com...
> ORA-911 is an invalid character. But I don't get that from your code:
>
> ORA9I SQL> CREATE TABLE Calling_Card
> 2 (
> 3 Company_Name VARCHAR(25),
> 4 Card_Number VARCHAR(25),
> 5 Starting_Value NUMBER(4,2),
> 6 Value_Left NUMBER(4,2),
> 7 Pin_Number VARCHAR(12)
> 8 )
> 9 ;
>
> Table created.
>
>
> As you can see, it worked just fine for me.

I most often get this when I have first mistyped something (or copied and pasted from elsewhere) and then just edited the script as (I hope) shown below.

SQL> CREATE TABLE Calling_Card
  2 2 (

  3    3  Company_Name   VARCHAR(25),
  4    4  Card_Number    VARCHAR(25),
  5    5  Starting_Value NUMBER(4,2),
  6    6  Value_Left     NUMBER(4,2),
  7    7  Pin_Number     VARCHAR(12)

  8 8 )
  9 9 ;
  2 (
  *
ERROR at line 2:
ORA-00922: missing or invalid option
SQL> ed
Wrote file afiedt.buf

  1 CREATE TABLE Calling_Card
  2 (

  3    Company_Name   VARCHAR(25),
  4    Card_Number    VARCHAR(25),
  5    Starting_Value NUMBER(4,2),
  6    Value_Left     NUMBER(4,2),
  7    Pin_Number     VARCHAR(12)

  8 )
  9* ;
SQL> /
 ;
 *
ERROR at line 9:
ORA-00911: invalid character

If you are just running the script then semicolons are fine but if you edit them its easy to forget that you will run the script with the / character. I probably only do this 8 times out of ten so it's in no way irritating :(

--
Niall Litchfield
Oracle DBA
Audit Commission UK
*****************************************
Please include version and platform
and SQL where applicable
It makes life easier and increases the
likelihood of a good answer
******************************************
Received on Thu Oct 31 2002 - 09:42:32 CST

Original text of this message

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