Re: Oracle 7.34 Anonymous PL/SQL vs Stored Procedure ?

From: <RTProffitt_at_beckman.com>
Date: Fri, 04 Jun 1999 00:10:34 GMT
Message-ID: <7j75hk$u6b$1_at_nnrp1.deja.com>


Could it possibly be because iCount is INTEGER and jCount is NUMBER?

I tried your code and it worked ok for me in SQL/Plus.

Is the same owner creating the procedure as executing it? Could there be any rights issue?

Another possibility might be using a temp variable, some languages don't like using the variable on the stack under certain circumstances. Thus code becomes:

CREATE OR REPLACE PROCEDURE SingleRowCursor(iCount OUT INTEGER) IS
  tempCount number;
BEGIN
 SELECT COUNT(*)
 INTO tempCount
   FROM all_objects
   WHERE object_name = 'TAB$';

  iCount := tempCount;

  DBMS_OUTPUT.PUT_LINE(icount);
 END; Another possibility is returning the value in a Function result rather than procedure...

Good Luck,
Robert Proffitt

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't. Received on Fri Jun 04 1999 - 02:10:34 CEST

Original text of this message