Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: procedure questions

Re: procedure questions

From: Keith Boulton <kboulton_at_ntlworld.com>
Date: Thu, 17 Jan 2002 21:57:58 -0000
Message-ID: <JJH18.39161$_x4.6179852@news2-win.server.ntlworld.com>

  1. You can have update without select privileges, your second statement issues a select.
  2. You can use execute immediate to execute a string containing the required update statement.

Philip Morrow <cracker_at_mymorrow.com> wrote in message news:_2H18.355796$oj3.69332055_at_typhoon.tampabay.rr.com...
> Two questions
> Why is it that when compiled a procedure with this body is valid
>
> update mcd.sumps a set a.comp = 1;
>
> but when I try this
>
> update mcd.sumps a set a.comp = 1
> where exists (
> select 'x' from mcd.sumps b
> where a.mstore = b.mstore
> and a.fweek = b.fweek
> and (a.fyr -1) = b.fyr);
>
> I get this error 'Line# = 6 Column# = 23 Error Text = PLS-00904:
> insufficiend privilege to access object mcd.sumps' If I'm not mistaken
the
> privileges to perform either operation is the same correct?
>
> Next question is how can I write the above statement where I pass a
variable
> into the procedure and use that variable to represent the schema? e.i.
> instead of mcd.sumps, variable.sumps.
>
>
>
>
Received on Thu Jan 17 2002 - 15:57:58 CST

Original text of this message

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