Subject [ib-support] return value
Author Rotandiko Sastroprawiro
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 ?