Subject | [ib-support] return value |
---|---|
Author | Rotandiko Sastroprawiro |
Post date | 2002-07-12T12:24:12Z |
Dear All,
I have make a store procedure Like this :
SET TERM ##;
CREATE PROCEDURE MERGE_CONTENT (SRC INTEGER, DST INTEGER)
RETURNS(Result SMALLINT)
AS
BEGIN
UPDATE REF_MASTER SET CATEGORY_ID = :DST WHERE CONTENT_ID IN
(SELECT DISTINCT CONTENT_ID
FROM REF_MASTER WHERE CATEGORY_ID = :SRC AND CONTENT_ID NOT IN (
SELECT CONTENT_ID FROM REF_MASTER WHERE CATEGORY_ID = :DST)) AND
CATEGORY_ID = :SRC;
DELETE FROM M_CATEGORIES WHERE CATEGORY_ID = :SRC;
Result = 1;
SUSPEND;
END ##
It is suppose return value of Result is 1, but is null , am i wrong ?
I have make a store procedure Like this :
SET TERM ##;
CREATE PROCEDURE MERGE_CONTENT (SRC INTEGER, DST INTEGER)
RETURNS(Result SMALLINT)
AS
BEGIN
UPDATE REF_MASTER SET CATEGORY_ID = :DST WHERE CONTENT_ID IN
(SELECT DISTINCT CONTENT_ID
FROM REF_MASTER WHERE CATEGORY_ID = :SRC AND CONTENT_ID NOT IN (
SELECT CONTENT_ID FROM REF_MASTER WHERE CATEGORY_ID = :DST)) AND
CATEGORY_ID = :SRC;
DELETE FROM M_CATEGORIES WHERE CATEGORY_ID = :SRC;
Result = 1;
SUSPEND;
END ##
It is suppose return value of Result is 1, but is null , am i wrong ?