Nicolay Vasiliev wrote:
> Hello there!
> 
> I tried to execute many SQL-clauses ";" separated by DBI::do() method
> but got an error message about SQL syntax mistake. 

You must execute statements one at a time with do(). Don't add semicolons at
the end.

> If I execute the
> same SQL from MySQL shell or some MySQL GUI all works fine. 

Those tools are internally splitting the script into separate statements and
executing them on at a time. When you use DBI, you have to do this splitting
yourself.

> Is
> DBI::do() method able to perform many SQL clauses at all? If no what
> method or function should I use to perform this?

There is a DBI::Shell module on CPAN you might want to look at. I have not
used it myself, so I can't comment on how well it works...

-- 
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