Drop Tables from Excel
880651Aug 5 2011 — edited Aug 9 2011This is my code that I want to excecute using ORAOLEDB driver in Excel. It executes fine from Rapid/SQL but it will not run in Excel and I am not finding any docuemntation on much of anything to do with oraOLEDB.
Declare
PROCEDURE DropTable (tbl IN VARCHAR2) AS
in_Exists int;
BEGIN
select count(*) into in_Exists from all_tables where UPPER(table_name) = upper(tbl);
IF in_exists > 0 THEN
EXECUTE IMMEDIATE ('DROP TABLE ' || upper(tbl) || ' CASCADE CONSTRAINTS PURGE');
COMMIT;
END IF;
END;
BEGIN
DropTable('tmpEMP');
DropTable('NOMSEmplExtract');
DropTable('NOMSEmplRegionDX');
DropTable('NOMSEmplRegionSubG');
DropTable('NOMSEmplState');
END;