I am trying to truncate the contents of a custom table in the Adobe Campaign database. I created that table to hold a set of data that is imported on a daily basis from an external file,but I need to truncate it before loading the data set.
I know I could use the Update activity to delete records, but that requires an input. I could build that input by querying all data in the target table first and pass it to the Update activity, then the Update activity would delete the records from the incoming population. However, it would be much more efficient to just truncate the full table.
Can someone provide guidance on how to do it?
Solved! Go to Solution.
just be carefull here.
Since the intention is to drop all the objects for a schema, why not just drop and recreate that schema with all the required privileges (rather than dropping each and every objects.
drop user <user_name> CASCADE;
then re-create that schema again.
if you want to keep the schema but to delete all objects you may try this:
select 'drop '||object_type||' '|| object_name || ';' from user_objects where object_type in ('VIEW','PACKAGE','SEQUENCE', 'PROCEDURE', 'FUNCTION', 'INDEX');
Please, ensure you are logged into a proper schema.