calling a DDL sql script from plsql block [message #253215] |
Mon, 23 July 2007 02:51 |
himang
Messages: 282 Registered: March 2005 Location: Bangalore
|
Senior Member |
|
|
Hi,
I want to execute a sql script from a PL/SQL block, is it possible? A sql script (say 2.sql) has some CREATE OR REPLACE commandsc
I want to create 1.sql which calls 2.sql based on some condition in a PL/SQL block in 1.sql
Something like
BEGIN
IF condition = TRUE THEN
@2.sql
END IF;
END;
/
It works when a DDL statement is not included in 2.sql as the contents of 2.sql gets embedded in the calling pl/sql block, but is there a way to call DDL statement script.
Regards
Himanshu
|
|
|
|
|
|
|
|
|
|
|