Bob, Thanks. Your guess is right. okay, I would run stmt by stmt. thanks, Jay
-----Original Message----- From: Bob Showalter [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 23, 2004 10:55 AM To: Jayakumar Rajagopal; [EMAIL PROTECTED] Subject: RE: $dbh->do('[EMAIL PROTECTED]') Jayakumar Rajagopal wrote: > Hi all, > I have to use PERL to run ".sql" files ( for eg. > runstmts.sql), which I do this way in SQL prompt : > > SQL> @runstmts I'm guessing Oracle sqlplus? > > I tried using $dbh->('[EMAIL PROTECTED]') and $dbh->('start > runstmts.sql')... but says 'invalid SQL stmt'. DBI can run sqlplus scripts; it operates at a lower level. There is a DBI::Shell module (and dbish program) that gives you functionality very roughly similar to what tools like sqlplus give you. The short answer is that you need to break the script up into individual SQL statements and execute them separately. If they produce output, you'll have to devise ways of processing that output yourself. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>