The following line produces and error in DBI excuting with either a do or a prepare, execute
my $statement = "SELECT \"Rows inserted\" + @rows "); # ODBC error my $statement2 = "SELECT 'Rows inserted' + @rows "); # works $dbh->do( $statement ); or $sth->prepare( $statement ); $sth->execute(); DBI: 1.46 DBD-ODBC: 1.11 Active State Perl 5.8.3 multi-thread Win2K The error: DBD::ODBC::db do failed: [Microsoft][ODBC SQL Server Driver][SQL Server]Invalid column name 'Rows inserted: '. (SQL-42S22) [Microsoft][ODBC SQL Server Driver][SQL Server]Invalid column name 'Rows inserted: '. (SQL-42S22)(DBD: Execute immediate failed err=-1) at c:/Cw/Dev/Library/Executables/sptool line 215, <$fileHandle> line 211.: MSSQL isql and Embarqadero do not complain about the double quotes. This is in a stored procedure, the text of which we are trying to run. Other tools do not complain about the double quotes, only DBI. Any ideas? Is this a bug? Or, is it simply incorrect for the user to be using double quotes (ie, not ANSI ? ) Thanks, James