Re: easy sql question

From: IKerr. <i.b.kerr_at_leeds.ac.uk>
Date: Thu, 23 Jan 2003 11:37:13 -0000
Message-ID: <FpQX9.104$1o.100_at_newsfep3-gui.server.ntli.net>


Hi Billy,

[Quoted] I tried your suggestion, and I get

[Quoted] [Quoted] grant &permissions ON table123 TO &user; and further down the line
SP2-0552: Bind variable "USER" not declared.

here is what I am trying (in an sql file):

SPOOL intermediate.sql

Select 'grant ' || '&permissions' || ' ON ' || table_name || ' TO ' || '&user' || ';'
From user_tables;

/* set echo on*/

SPOOL OFF start intermediate.sql

thanks

Iain

"Billy Verreynne" <vslabs_at_onwe.co.za> wrote in message news:b0ohe0$joa$1_at_ctb-nnrp2.saix.net...
> IKerr. wrote:
>
> <snipped>
> > "SP2-0734: unknown command beginning "Enter valu..." - rest of line
> > ignored."
> >
> > How can I make the lines disappear from the spooled script before it is
> > run.
>
> SET define off
>
>
> This will disable all SQL*Plus prompts caused by the & char, e.g.
>
> SQL> Prompt &Hello there
> Enter value for &Hello:
>
> vs.
>
> SQL> set define off;
> SQL> Prompt &Hello there
> &Hello there
>
>
> --
> Billy
Received on Thu Jan 23 2003 - 12:37:13 CET

Original text of this message