Re: stored procedure purgatory
From: David <snapkad_at_post.cz>
Date: Thu, 23 Nov 2000 08:33:27 +0100
Message-ID: <3a1cc817$1_at_news.cvut.cz>
Date: Thu, 23 Nov 2000 08:33:27 +0100
Message-ID: <3a1cc817$1_at_news.cvut.cz>
Cursor must be in declaration section before begin.
CREATE OR REPLACE PROCEDURE sumCost(passedInPmwrkord_code IN
VARCHAR2) AS
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 -- should be
b.passedInPmwrkord_code but if this name is used only in table b it doesn't
matter
GROUP BY a.pmwrkord_code, a.description;
BEGIN
null; -- must be anythink to generate at least null, but there will be your
program instead of null
END;
/ -- this is used to run PL/SQL
Received on Thu Nov 23 2000 - 08:33:27 CET
