No, not through DBI, that's not what it was designed to do, you can either
open a pipe to sqlplus and do it that way, or open the file and execute line
by line. @file_name is a sqlplus specific command and is not an oracle
function.
Ilya
-----Original Message-----
From: Rahul R M Desai
To: [EMAIL PROTECTED]
Sent: 4/16/02 2:54 AM
Subject: Running a .sql file
Hi all,
I have some procedures and functions in a .sql file. What I need to do
is
1. create the procedures and functions.
2. Execute them.
3. Drop the procedures and functions.
All this I have to do in a perl script.
I was trying to find a way to create the procedures in the file.
I tried :
eval {
my $func = $dbh->prepare( <mailto:'@C:\MyProject\file.sql'>
'@C:\MyProject\file.sql');
$func->bind_param(":parameter1", $timestamp);
$func->execute;
$dbh->commit;
};
which is not working :-)
Is there any way that I can achieve this.
TIA,
Rahul Desai