日期:2014-05-17 浏览次数:20788 次
CREATE OR REPLACE PROCEDURE spSelPreSettleDate
(
v_TradeDate NUMBER,
v_SettleDay OUT NUMBER
)
AS
BEGIN
IF v_TradeDate IS NULL THEN
v_TradeDate:=HYHQ.BJT2UTC(SYSDATE);
SELECT NVL(SettleDay,0)
INTO
v_SettleDay
FROM SettleStatus a
WHERE a.SettleDay <v_TradeDate
AND a.Flag=0
AND ROWNUM=1
ORDER BY SettleDay DESC;
END IF;
END;
CREATE OR REPLACE PROCEDURE spSelPreSettleDate(v_TradeDate in out NUMBER, --定义成in out参数不就行了
v_SettleDay OUT NUMBER) AS
BEGIN
IF v_TradeDate IS NULL THEN
v_TradeDate := HYHQ.BJT2UTC(SYSDATE);
SELECT NVL(SettleDay, 0)
INTO v_SettleDay
FROM SettleStatus a
WHERE a.SettleDay < v_TradeDate
AND a.Flag = 0
AND ROWNUM = 1
ORDER BY SettleDay DESC;
END IF;
END;