Hi,

I am trying to run a oracle SQL script file using Scripting --> SQL function.

I set the connection properly and check "SQL from file"
and selected the script i would like to run.

but it keeps failing.

the script look like the following,

basically, it drop the table if exist then recreate it.

I did similar thing in TSQL against SQL SERVER, and it works fine.

did I do anything wrong??

thanks

DECLARE IFEXIST NUMBER;
BEGIN
SELECT COUNT(*) INTO IFEXIST FROM USER_TABLES WHERE TABLE_NAME = 'EXCEL_ORGCHART';
IF IFEXIST = 1 THEN
EXECUTE IMMEDIATE 'DROP TABLE EXCEL_ORGCHART';
END IF;
END;


CREATE TABLE EXCEL_ORGCHART
(
OfficeCode CLOB
, OfficeDescription CLOB
, LegacyMapping CLOB
, DepartmentCode CLOB
, DepartmentDescription CLOB
, LegacyMappingCode CLOB
)
;