The script that is open in the editor can be empty or can contain one or more existing SQL statements. You can import SQL statements from multiple files to the same script in separate passes.
If you import SQL statements to a script that already contains SQL statements, the imported SQL statements are bracketed with BEGIN and END comment lines. An additional Script comment line describes the path to the file that contains the imported SQL statements.
CREATE TABLE t1 (c1 char c2 char(20) c3 char(30) ); INSERT INTO t1 VALUES "a", "a", "g"); SELECT * FROM t1; -- BEGIN imported SQL statements -- Script: C:\Documents and Settings\userID\Desktop\scripts\sample2.sql CREATE TABLE t2 (c1 char c2 char(20) c3 char(30) ); INSERT INTO t2 values "b", "b", "h"); -- END imported SQL statements -- BEGIN imported SQL statements -- Script: C:\Documents and Settings\userID\Desktop\scripts\sample3.sql CREATE TABLE t3 (c1 char c2 char(20) c3 char(30) ); INSERT INTO t3 values "c", "c", "i"); -- END imported SQL statements
To import SQL statements to a script in the SQL and XQuery editor: