Thanks Joseph.
I will try opening .sql file, and iterate through every stmt. in it.
regards,
Jay
-----Original Message-----
From: R. Joseph Newton [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 24, 2004 2:25 AM
To: Jayakumar Rajagopal
Cc: [EMAIL PROTECTED]
Subject: Re: $dbh->do('[EMAIL PROTECTED]')


Jayakumar Rajagopal wrote:

> Hi all,
>        I have to use PERL to run ".sql" files

No you don't.  When I was in Oracle class, nobody even knew what Perl was, and we ran 
scripts directly at the
prompt.  I think you are getting your interfaces mixed up here.  Perl is called from a 
shell of the OS.  The
Oracle command interface is nopt a shell to the OS, but only to the Oracle SQL engine. 
 You should consult
your Oracle documentation for the specific syntax to use at the command line.  Do not 
try to involve Perl in
the task as you have structured it.  Just call your SQL script.

SQL> start runstmts.sql;

Don't confuse the two interfaces.  You can run a script with Perl, using the DBI 
module and DBD::Oracle, but
that will probably involve reading the script statements and executing them 
one-by-one.  Unless there is a
need to do this programatically, though, running the SQL script has nothing to do with 
Perl.

Joseph




--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to