Hi There another SQL Question for you all....
I am trying to create a cursor with the SQL attached I am fairy confident works:
select table_name from user_tables
where table_name like '%TRACE%'
and table_name not in 'SIIPSCINPARAMETERSCHECKTRACE'
and table_name not in 'SIIPSCINPARAMETERSTRACE'
and table_name not in 'VMSTRANSACTIONDETAILSTRACE'
and table_name not in 'VMSTRANSACTIONHEADERTRACE';
The cursor will initalise based on the results of the SQL. for every record returned from the cursor I want to store the tablename into a variable. On every loop the variable will be added to a SQL delete command.
Basically I am trying to achieve the following:
Create a package that is executed via DBMS_Jobs. This package will include the cursor that runs the above SQL. This will be used to delete data from cursor results excluding tables above.