I am executing simple insert SQL queries in a loop I have a simple requirement - While insert quieries are being executed, if any error occurs it should print that message and move to next insert sql query. I am using DBD::Oracle on Unix
Cheers, Parag On Fri, Apr 30, 2010 at 1:10 PM, Ovid <publiustemp-d...@yahoo.com> wrote: > ----- Original Message ---- > > From: Parag Kalra <paragka...@gmail.com> > > > > I am executing list of SQL queries from a file. Currently if > > there is an error (like syntax issue) in any of the sql query it > doesn't > > processes the other remainig queries. > > > > I tried executing the queries in 'eval' but it doesn't seem to work. I > am > > using DBI and DBD::Oracle > > > Without seeing the code and seeing the error, it's not possible to know > exactly what is going wrong here. > > If you're trying to process several sql queries with a single $dbh->do, > then it's quite natural than an eval won't allow subsequent queries to > execute because they're all in the same transaction. > > It's also possible that you're trying to execute the sql statements > separately, but it's failing on query which inserts data that subsequent > queries are dependant on. Again, it's not possible to say if this is what's > happening without seeing some code and error messages. > > > Cheers, > Ovid > -- > Buy the book - http://www.oreilly.com/catalog/perlhks/ > Tech blog - http://blogs.perl.org/users/ovid/ > Twitter - http://twitter.com/OvidPerl > Official Perl 6 Wiki - http://www.perlfoundation.org/perl6 > > >