On Thu, Oct 16, 2008 at 4:04 PM, Robert Klemme <shortcutter / googlemail.com> wrote: >>> See above. But normally I'd parse the text in chunks using the slash >>> at the beginning of the line as delimiter and submit statements >>> separately. >> >> Not sure what you mean.. could you please elaborate a bit? > > Instead of submitting the whole file as a single statement (string) to the > database, parse (or split) it into chunks (using "^/" as delimiter) and > submit those chunks one by one. It is what sqlplus and other Oracle tools do. Oracle cannot run more than one bare SQL statement or PL/SQL block at once. Another (unusual) way is submitting a PL/SQL block which contains SQL statements as follows: BEGIN BEGIN EXECUTE IMMEDIATE 'DROP TYPE crosstab_report_tbl'; EXCEPTION WHEN OTHERS THEN NULL; END; EXECUTE IMMEDIATE 'create table tester2 (counter int)'; END;