Open the file with “vi” editor and type the following:
:%s/^M//g
NOTE: To get the ^M in there, you should type CTRL+V+M
SELECT us.sequence_name
FROM USER_SEQUENCES us;
SELECT ut.table_name
FROM USER_TABLES ut;
DECLARE
BEGIN
--Bye Tables!
FOR i IN (SELECT ut.table_name
FROM USER_TABLES ut) LOOP
EXECUTE IMMEDIATE 'drop table '|| i.table_name ||' CASCADE CONSTRAINTS ';
END LOOP;
END;
DECLARE
BEGIN
--Bye Sequences!
FOR i IN (SELECT us.sequence_name
FROM USER_SEQUENCES us) LOOP
EXECUTE IMMEDIATE 'drop sequence '|| i.sequence_name ||'';
END LOOP;
END;