On Tue, 18 Jan 2005 16:10:52 -0500, Moosmann, James <[EMAIL PROTECTED]> wrote: > 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
That conforms to the SQL standard. According to the standard, the version with double quotes is attempting to use a delimited identifier - a column name called "Rows inserted" (where the double quotes are not part of the column name, but the blank is, and the name is case sensitive). You should, in theory, get a column not found error - syntax error is a substitute, perhaps? Were you using an Informix database, you would be fine - it treats double quotes and single quotes interchangeably -- unless you specify via an environment variable that you want to use delimited identifiers, in which case, you have to follow the standard. -- Jonathan Leffler <[EMAIL PROTECTED]> #include <disclaimer.h> Guardian of DBD::Informix - v2003.04 - http://dbi.perl.org "I don't suffer from insanity - I enjoy every minute of it."