I’ve been looking at my code for a while and searching for any syntax errors that may be causing the problem but I really can’t find it anywhere. I’m running the script in Oracle Autonomous Database and tried it on the Live SQL but it won’t run on both.
Code is:
VARIABLE b_basic_percent NUMBER
VARIABLE b_pf_percent NUMBER
DECLARE
v_today DATE := SYSDATE;
v_tomorrow v_today%TYPE;
BEGIN
v_tomorrow := v_today + 1;
DBMS_OUTPUT.PUT_LINE('Hello World');
DBMS_OUTPUT.PUT_LINE('TODAY IS : ' || v_today);
DBMS_OUTPUT.PUT_LINE('TOMORROW IS ' || v_tomorrow);
:b_basic_percent := 45;
:b_pf_percent := 12;
END;
/
PRINT b_basic_percent
PRINT b_pf_percent
I’ve tried removing the whitespaces between the “:=” and values but I don’t think it’s significant.
New contributor
Davidismy Favname is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.