Re: PL/SQL not accepting CREATE TABLE command?!?

From: (wrong string) ørgensen <kjorg_at_msn.com>
Date: 1997/12/10
Message-ID: <ecgodnaB9GA.315_at_upnetnews02.moswest.msn.net>#1/1


Nope. Remember that PL/SQL only accepts DML statements. The Create table statement is a DDL statement.

If you really want to create tables from within PL/SQL, you'll have to resort to using the DBMS_SQL package

Hope this helps

Karl

kgrigg_at_acxiom.com wrote in message <881597187.4150_at_dejanews.com>...
>Hello all, I am writing some PL/SQL and what I am wanting to do it
>retrieve values from cursors, do some manipulations and insert it into a
>table I created in the PL/SQL code, then do a SELECT on the table and
>spool it out to a file....and finally, drop the table. I get the
>following error:
>
>ORA-06550: line 3, column 1:
>PLS-00103: Encountered the symbol "CREATE" when expecting one of the
>following:
>
> begin declare 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 commit <a single-quoted SQL string>
>
>
>Does this mean I cannot create and drop tables from within PL/SQL? I was
>assuming this was how to do a temporary table....
>
>Any suggestions out there?
>
>TIA!!
>
>Kelly
>kgrigg_at_acxiom.com
>
>ps. Please cc by mail too...our newsfeed is not reliable here...thus I'm
>posting from DejaNews...
>
>-------------------==== Posted via Deja News ====-----------------------
> http://www.dejanews.com/ Search, Read, Post to Usenet
Received on Wed Dec 10 1997 - 00:00:00 CET

Original text of this message