Re: stored procedure purgatory
Date: Thu, 23 Nov 2000 13:47:39 GMT
Message-ID: <%d9T5.12539$6W1.693585_at_news.flash.net>
> CREATE OR REPLACE PROCEDURE sumCost(passedInPmwrkord_code IN
> VARCHAR2) IS
> CURSOR get_wo_acct_num_cur IS
> SELECT a.pmwrkord_code, a.description, SUM(b.cost)
> FROM pmwrkord a, pmtimed b
> WHERE a.pmwrkord_code = b.pmwrkord_code
> AND a.pmwrkord_code = passedInPmwrkord_code
> GROUP BY a.pmwrkord_code, a.description;
BEGIN
/*
decide what you are going to do with this cursor here. Also decide where the sum of the cost per work code and description is going.
If you need to return something, change this to a function or add an out parameter to the
parameter list above.
If you are returning a resultset, then you should declare this inside a
package and create a
ref cursor. Test the refcursor inside sqlplus as the returned resultset
from this function.
*/
> END;
Received on Thu Nov 23 2000 - 14:47:39 CET
