Quote:
Originally Posted by areya
This is a SQLPLUS question. How do I display what is being executed. In other words, in the listing below what command do I need to use to see if commit will be executed. As an example, can I say:
ECHO "commit begins";
is this the right syntax for SQLPLUS?
*******************************************
declare
recs number := 0;
looper number := 0;
i number;
begin
select count(*) into recs from TTRACK where call_dt < '1940/01/01';
if recs > 0 and recs > 4 then looper := recs/5;
elsif recs between 0 and 4 then looper := 1;
elsif recs = 0 then
return;
end if;
for i in 1..looper loop
DELETE FROM TTRACK WHERE rownum < 5 AND CALL_DT < '1940/01/01';
commit;
end loop;
end;
/
***************************************end******** ****************
Make use of DBMS_OUTPUT.PUT_LINE in order to display any user defined message on the screen.
Before useing DBMS_OUTPUT package, you need to execute the below command:
Then you include the line DBMS_OUTPUT.PUT_LINE('Commit Begins') in your anonymous block