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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Creating a simple stored procedure

RE: Creating a simple stored procedure

From: Mercadante, Thomas F <NDATFM_at_labor.state.ny.us>
Date: Thu, 30 Jan 2003 08:45:07 -0800
Message-ID: <F001.0053EDDD.20030130084507@fatcity.com>


Bob,

where does the table mytab exist? - probably not in the same account as where you are creating the sp. in this case, you need to do two things. change the sp to say:

update {schema}.mytab where {schema} is where the table exists.

secondly, from {schema} you need to : grant select, insert, update, delete on mytab to {user} where {user} is where the sp exists.

good luck!

Tom Mercadante
Oracle Certified Professional

-----Original Message-----
Sent: Thursday, January 30, 2003 10:31 AM To: Multiple recipients of list ORACLE-L

How can I create this simple stored procedure

Obiviously I don't have much experience but I would not think this being as difficult as it appears

I want to run an update on a table (eventually from a job) I just need to get the sp working... Any examples Ive seen are much too complex for this simple task

CREATE OR REPLACE PROCEDURE XYZ
  AS
 BEGIN
UPDATE myTab SET STATUS = 'a' WHERE STATUS = 'b' ;   END XYZ; This is telling me I need to declare myTab... Ive tried every iteration of declaring... But its not happening
So, I present my delimma to my knowledgable friends @fatcity!

{about to go insane}
bob
--

Please see the official ORACLE-L FAQ: http://www.orafaq.net
--

Author: Bob Metelsky
  INET: bmetelsky_at_cps92.com

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
--

Please see the official ORACLE-L FAQ: http://www.orafaq.net
--

Author: Mercadante, Thomas F
  INET: NDATFM_at_labor.state.ny.us
Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Thu Jan 30 2003 - 10:45:07 CST

Original text of this message

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