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: Is this possible to do with SQL Plus?

Re: Is this possible to do with SQL Plus?

From: PMG <peteg_at_garlic.com>
Date: Wed, 11 Aug 1999 20:58:27 -0700
Message-ID: <37B24662.92D278D8@garlic.com>


Thanks, I had totally forgotten about that technique!!!

Pete

Sybrand Bakker wrote:

> The general approach before the PL/SQL era was (and it still works)
> in sqlplus
> set feedback off heading off pagesize 0
> spool temp.sql
> select 'whatever ddl'||table_name||';'
> from user_tables;
>
> spool off
> start temp.sql
>
> Of course this is just an example.
>
> Hth,
> Sybrand Bakker, Oracle DBA
>
> PMG <peteg_at_garlic.com> wrote in message news:37B0FA60.A91CD24C_at_garlic.com...
> > I tried the following in a script to be executed in SQL Plus, but it
> > doesn't work:
> >
> > select decode(user, 'pete', 'grant select on table1 to joe', null) from
> > dual;
> >
> > Is it possible to execute a DDL-type statement based upon a who is the
> > owner thru SQL Plus, or do I need to do this thru a procedure?
> >
> > TIA
> >
> > Pete
> >
Received on Wed Aug 11 1999 - 22:58:27 CDT

Original text of this message

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