quote() is normally used like this (for instance):
my $stmt = "UPDATE mytable SET name=" . $dbh->quote("fred") . "WHERE age=3";
That is, the quote() function *puts* the quotes in.  Try
$ man DBI
for more information.

The other part:  I'm rusty on Oracle, but the query
SELECT 'Rows returned:'
doesn't sound like it would be valid syntax in any flavour of SQL.  Maybe
you need to review SQL basics first.

-Will


-----Original Message-----
From: Moosmann, James [mailto:[EMAIL PROTECTED] 
Sent: Tuesday 18 January 2005 18:35
To: 'David Goodman'
Cc: dbi-users@perl.org
Subject: RE: Double quotes in select statement throw an error


Nope, same results, Here is a simple example:

Is the syntax invalid?

use DBI; 
my $dbh = DBI->connect('dbi:ODBC:somedb','',''); 
my $qs = $dbh->quote( "SELECT \"Rows returned: \" "); $dbh->do($qs); print
$dbh->errstr;


     - - - - - - -  Appended by Scientific-Atlanta, Inc.  - - - - - - -  
This e-mail and any attachments may contain information which is confidential, 
proprietary, privileged or otherwise protected by law. The information is 
solely intended for the named addressee (or a person responsible for delivering 
it to the addressee). If you are not the intended recipient of this message, 
you are not authorized to read, print, retain, copy or disseminate this message 
or any part of it. If you have received this e-mail in error, please notify the 
sender immediately by return e-mail and delete it from your computer.

Reply via email to