Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: easy sql question
Hi Billy,
I tried your suggestion, and I get
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 - 05:37:13 CST
![]() |
![]() |