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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Why do I get this sqlplus error?

Re: Why do I get this sqlplus error?

From: Michael Sun <mikeny31_at_speakeasy.org>
Date: Fri, 9 Jun 2000 22:45:41 -0400
Message-Id: <10523.108512@fatcity.com>


Winnie,

I believe you meant DDL when you said DML.

Michael

>
> There is no DML statement allowed in PL/SQL block! If you want to run DML
> statement, please use DBMS_SQL package.
>
> Winnie
>
>
>
>
>
> "Guang Mei" <zlmei_at_hotmail.com> on 06/07/2000 03:24:14 PM
>
> Please respond to ORACLE-L_at_fatcity.com
>
> To: Multiple recipients of list ORACLE-L <ORACLE-L_at_fatcity.com>
> cc: (bcc: Winnie Liu/HQ/ISC)
>
>
>
>
>
> Hi:
>
> I have a sql script file called "test.sql" that I try to run in sqlplus.
> When I run it, it get the following error:
>
> SQL> @e:\catalog_management\test;
> drop table CATALOG_MANAGEMENT.HPXCATALOGBRANCH;
> *
> ERROR at line 27:
> ORA-06550: line 27, column 1:
> PLS-00103: Encountered the symbol "DROP" when expecting one of the
> following:
> begin declare else elsif end exit for goto if loop mod null
> pragma raise return select update while <an identifier>
> <a double-quoted delimited-identifier> <a bind variable> <<
> close current delete fetch lock insert open rollback
> savepoint set sql execute commit forall
> <a single-quoted SQL string>
> The symbol "lock was inserted before "DROP" to continue.
> ORA-06550: line 27, column 47:
> PLS-00103: Encountered the symbol ";" when expecting one of the following:
> . , @ in <an identifier>
> <a double-quoted delimited-identifier>
>
>
> The drop table command is the first command in
> "drop_tabs_catalog_management.sql" file.
>
> I am wondering why I got the error.
>
> Thanks.
>
> Guang
>
>
> PS: Here is the code for "test.sql":
>
> -- test.sql
> -- by Guang Mei, 6/6/2000
> --
>
> set serveroutput on
>
> declare
> TABLE_COUNT NUMBER;
>
> begin
>
> select count(*) into TABLE_COUNT from all_tables where
> owner='CATALOG_MANAGEMENT';
>
> if TABLE_COUNT > 0 then
>
> dbms_output.put_line ('Error: There are tables in schema
> CATALOG_MANAGEMENT!');
> dbms_output.put_line ('Table Count = ' || TABLE_COUNT);
> @e:\catalog_management\drop_tabs_catalog_management.sql;
>
> else
>
> NUll;
> @e:\catalog_management\copy_from_prod_to_catalog_mang.sql;
>
> end if;
>
> end;
>
> /
>
> ________________________________________________________________________
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
>
> --
> Author: Guang Mei
> INET: zlmei_at_hotmail.com
>
> Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
> San Diego, California -- Public Internet access / Mailing Lists
> --------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from). You may
> also send the HELP command for other information (like subscribing).
>
>
>
>
>
>
> --
> Author:
> INET: Winnie_Liu_at_infonet.com
>
> Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
> San Diego, California -- Public Internet access / Mailing Lists
> --------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from). You may
Received on Fri Jun 09 2000 - 21:45:41 CDT

Original text of this message

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