Home » SQL & PL/SQL » SQL & PL/SQL » Running SQL script/file
Running SQL script/file [message #36036] Wed, 31 October 2001 05:02 Go to next message
PT
Messages: 2
Registered: October 2001
Junior Member
Is it possible, and if so how, to run a file that contains SQL (a SQL script) from within a stored procedure?

Thanks
Philip

----------------------------------------------------------------------
Re: Running SQL script/file [message #36042 is a reply to message #36036] Wed, 31 October 2001 13:57 Go to previous messageGo to next message
andrew again
Messages: 2577
Registered: March 2000
Senior Member
you can use DBMS_PIPE to invoke an OS command. The OS command is then to run an OS script whoich invokes sqlplus which in turn runs your script. In general an SQL script will have sql*plus specific commands like "set pagesize 56" etc resulting in SQL*plus being the only environment capable of running it.

http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:16212348050
http://www.orafaq.net/msgboard/plsql/messages/3054.htm

----------------------------------------------------------------------
Re: Running SQL script/file [message #36046 is a reply to message #36036] Thu, 01 November 2001 03:42 Go to previous message
Phenoracle
Messages: 35
Registered: March 2001
Member
Hi,

Look at the system_util package on this site.
It has a procedure that enables you to call
OS scripts from inside PL/SQL.

http://www.phenoracle.co.uk

Have fun
Rae



----------------------------------------------------------------------
Previous Topic: Date problem
Next Topic: Insert Multiple values on an If statement
Goto Forum:
  


Current Time: Tue Nov 26 15:07:16 CST 2024