當運行這個小腳本時,我收到錯誤「在index :: 1處缺少IN或OUT參數」不確定我在哪裏犯錯/ s?index:1缺少IN或OUT參數Oracle
{
DECLARE
LV_CODE_TXT VARCHAR (5) := 'A';
LV_ORDERTOTAL_NUM NUMBER(6,2) := 100;
LV_DISCOUNT_NUM NUMBER(5,2);
BEGIN
IF LV_CODE_TXT IN ('A','E')
THEN
LV_DISCOUNT_NUM =: LV_ORDERTOTAL_NUM * .05;
DBMS_OUPTUT.PUT_LINE (LV_DISCOUNT_NUM);
ELSIF LV_CODE_TXT IN ('B','C')
THEN
LV_DISCOUNT_NUM := LV_ORDERTOTAL_NUM * .10;
DBMS_OUTPUT.PUT_LINE (LV_DISCOUNT_NUM)
ELSIF LV_CODE_TXT = 'D'
THEN
LV_DISCOUNT_NUM := LV_ORDERTOTAL_NUM * .15;
DBMS_OUTPUT.PUT_LINE (LV_DISOCUNT_NUM);
ELSE
LV_DISOUNT_NUM := 0;
DBMS_OUTPUT.PUT_LINE(LV_DISOUNT_NUM);
END IF;
END;
}
這裏「DBMS_OUPTUT」 .PUT_LINE(LV_DISCOUNT_NUM ); –
還不確定我需要改變什麼?我需要將DBMS_OUTPUT放在雙引號中嗎?我改變了局部變量的拼寫錯誤,但仍然無法工作。 – DKCroat