1 declare
2 v_timestamp varchar2(32);
3 begin
4 dbms_output.put_line('Before');
5 begin
6 select timestamp into v_timestamp from sysstats where 1 = 2;
7 EXCEPTION
8 WHEN no_data_found THEN null;
9 end;
10 dbms_output.put_line('After ');
11 begin
12 select timestamp into v_timestamp from sysstats where 1 = 2;
13 EXCEPTION
14 WHEN no_data_found THEN null;
15 end;
16 select to_char(sysdate,'YYYY-MON-DD:HH24:MI') into v_timestamp from dual;
17 dbms_output.put_line('Now is - ' || v_timestamp);
18 EXCEPTION
19 WHEN OTHERS THEN NULL;
20* END;
bcm@MWH.ARES.MWH.COM> /
Before
After
Now is - 2004-JAN-28:13:27
PL/SQL procedure successfully completed.