我必须将所有过程从Oracle迁移到DB2数据库。我想知道,我如何在程序内部调用函数,如下一个
功能脚本
create or replace
PACKAGE GPRSG001
AS
-->> Variáveis <<--
TYPE v_trLinha IS RECORD (v_sColuna VARCHAR2(32767));
TYPE v_ttTabela IS TABLE OF v_trLinha;
FUNCTION GPRS7004(
-->> Parâmetros de Entrada <<--
pe_sTexto VARCHAR2)
RETURN VARCHAR2;
END GPRSG001;
Oracle脚本
BEGIN
SELECT CCOOP
INTO ps_iPkCooperativa
FROM COOP
WHERE GPRSG001.GPRS7004(NDOCTO || ICOOP) = v_sParametrosFormatados;
EXCEPTION
WHEN NO_DATA_FOUND
THEN ps_iPkCooperativa := 0;
END;
Thks Guy