I've got a perl script that I use to run sql scripts against various RDBMS'. While this works against other databases I seem to getting problems when getting the server to recognize the end of statement terminator. I keep getting this error message:
DBD::ODBC::db do failed: [SAP AG][SQLOD32 DLL][SAP DB]Syntax error or access violation;-3014 POS(45) Invalid end of SQL statement. (SQL-42000)(DBD: Execute immediate failed err=-1) at N:\testScriptRun.pl line 23. The perl script in question looks like this. #!/usr/bin/perl use strict; use DBI; my $db = 'DBI:ODBC:RAT1'; my $username = 'test'; my $pass = 'test'; my $sqlfile = 'test.sql'; open(MYHANDLE, $sqlfile ); my @sqltext = <MYHANDLE>; close(MYHANDLE); print @sqltext; my $dbh = DBI->connect($db, $username, $pass); my $sql = qq{ @sqltext }; print "executing sql....\n"; $dbh->do($sql); print "sql executed\n"; $dbh->disconnect(); close(MYHANDLE); ------------------------------------------------------------------------ The sql script looks like this: CREATE TABLE myTable (x int, y varchar(50)) INSERT into myTable values (1, 'first val') INSERT into myTable values (2, 'Second value') Ive tried using these delimiters without success (// and ; ). ****************************************************************************************************************************************************** This e-mail has been prepared using information believed by the author to be reliable and accurate, but Thales Information Systems Finance makes no warranty as to accuracy or completeness. In particular Thales Information Systems Finance does not accept responsibility for changes made to this e-mail after it was sent. Any opinions expressed in this document are those of the author and do not necessarily reflect the opinions of the company or its affiliates. They may be subject to change without notice. This e-mail, its content and any files transmitted with it are intended solely for the addressee(s) and may be legally privileged and/or confidential. Access by any other party is unauthorised without the express written permission of the sender. If you have received this e-mail in error you may not copy or use the contents, attachments or information in any way. Please destroy it and contact the sender via the Thales Information Systems Finance switchboard in London at +44 (0) 20 7650 0100 or via e-mail return. This message and any attachments have been scanned for viruses prior to leaving the originators network. The originator does not guarantee the security of this message and will not be responsible for any damages arising from any alteration of this message by a third party or as a result of any virus being passed on. ******************************************************************************************************************************************************* -- MaxDB Discussion Mailing List For list archives: http://lists.mysql.com/maxdb To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]