Initialize value with date functions
SQL>
SQL> DECLARE
2 lv_three_month_forecast_date DATE := ADD_MONTHS(SYSDATE,3);
3 lv_current_user_txt VARCHAR2(40) := TO_CHAR(UID) ||
4 ': ' || USER;
5 lv_date_as_number_num PLS_INTEGER := TO_NUMBER(TO_CHAR(
6 SYSDATE, 'YYYYMMDD'));
7 BEGIN
8 DBMS_OUTPUT.PUT_LINE(lv_three_month_forecast_date);
9 DBMS_OUTPUT.PUT_LINE(lv_current_user_txt);
10 DBMS_OUTPUT.PUT_LINE(lv_date_as_number_num);
11 END;
12 /
19-SEP-08
36: JAVA2S
20080619
PL/SQL procedure successfully completed.
SQL>
Related examples in the same category