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: CREATE TABLE in procedure?

Re: CREATE TABLE in procedure?

From: M. Armaghan Saqib <armaghan_at_yahoo.com>
Date: Sat, 22 Jan 2000 15:37:53 +0500
Message-ID: <86oqp7$25pg$3@dolf.netfront.net>


My 2 cents:

My SQL PlusPlus (freeware) makes using DBMS_SQL very easy. It generates = all the PLSQL code required to WRAP an SQL statement before executing.

regards,
M. Armaghan Saqib

+---------------------------------------------------------------
| 1. SQL PlusPlus => Add power to SQL Plus command line
| 2. SQL Link for XL => Integrate Oracle with XL
| 3. Oracle CBT with sample GL Accounting System | Download free: http://www.geocities.com/armaghan/
+---------------------------------------------------------------
  Sybrand Bakker <postmaster_at_sybrandb.demon.nl> wrote in message = news:948435085.4842.0.pluto.d4ee154e_at_news.demon.nl...   This same question was answered yesterday.   Use the dbms_sql package (v7)
  Use execute immediate (v8)

  Hth,

  --
  Sybrand Bakker, Oracle DBA
    Alan Hong <hongshi_at_fuse.net> wrote in message = news:s8fhhcjseh670_at_corp.supernews.com...

    Hi,

    Can I put the "create table temp1 as select .... from .... where = ....." into

    a stored procedure/function on the server??

    I got the error when I was trying to do this:

    PLS-00103: Encountered the symbol "CREATE" when expecting one of the     following:

       begin declare end exception exit for goto if loop mod null
       pragma raise return select update while <an identifier

    Is it possible to put 'CREATE table....' in a procedure?

    Any idea/help will be greatly appreciated!!

    Dana
    dan_jian_at_hotmail.com

    Andreas Michler <Andreas.Michler_at_adicom.de> wrote in message     news:3887301D.38E238D0_at_adicom.de...
> I think you mean temp-tables.
> In this way oracle doesn't have any temp Tables.
> You can do it in the following way
> create table temp1 as select .... from .... where .....,;
> create table temp2 as select .... from .... where ....;
>
> Don't forget to drop the table temp1,temp2,,,, manually. The will =
not be

> droppped automatically.
>
>
> Dana Jian wrote:
>
> > Hi,
> >
> > I'm converting one procedure from SQL server to Oracle =
procedure.

> >
> > Here's the simplified statements in the SQL proc,
> >
> > SELECT ... INTO #temp1 FROM....WHERE..
> >
> > SELECT ... INTO #temp2 FROM... WHERE
> >
> > SELECT ... FROM #temp1, #temp2 , .... WHERE ...
> >
> > How to do this in Oracle PL/SQL?
> >
> > Any comments/help will be highly appreciated!!
> >
> > Dana
> > djian_at_trasa.com
>
> --
> -------------------------------------
> ADICOM Informatik GmbH
> Andreas Michler
> Wiesfleckenstr. 34
> 72336 Balingen
> Tel: 07433/9977-57,Fax: -90
> E-Mail: Andreas.Michler_at_adicom.de
> http:\\www.adicom.de
> -------------------------------------
>
>



Posted via news://freenews.netfront.net Complaints to news_at_netfront.net Received on Sat Jan 22 2000 - 04:37:53 CST

Original text of this message

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