freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: Bob Kline <bkline AT rksystems.com>
- To: TDS Development Group <freetds AT franklin.metalab.unc.edu>
- Subject: Re: What SQL syntax can I use with FreeTDS?
- Date: Mon, 22 Jul 2002 13:48:01 -0400 (EDT)
On Mon, 22 Jul 2002, Peppi Vecchio wrote:
> I'm used to using DBI and MySQL but the syntax in DBD::Sybase/SQL
> Server is different. Am I to use Sybase syntax or SQL Server 7.0
> syntax? Specifically I have difficulty passing a string into my
> SELECT query.
>
> my $a1 = "This";
> my $a2 = $dbh->quote( "SELECT COUNT(*) FROM this_table WHERE
> this_column >= $a1" );
> my $sth = $dbh->prepare( $a2 );
> $sth->execute() or die $sth->errstr;
I'll bet not even MySQL lets you get away with "WHERE col >= This"
when you mean "WHERE col >= 'This'." You're mixing up placeholders with
Perl string interpolation. Put single quotes around $a1 inside the
argument to $dbh->quote().
--
Bob Kline
mailto:bkline AT rksystems.com
http://www.rksystems.com
-
What SQL syntax can I use with FreeTDS?,
Peppi Vecchio, 07/22/2002
- <Possible follow-up(s)>
- Re: What SQL syntax can I use with FreeTDS?, Bob Kline, 07/22/2002
- Re: What SQL syntax can I use with FreeTDS?, Peppi Vecchio, 07/22/2002
- Re: What SQL syntax can I use with FreeTDS?, Patrick Muldoon, 07/22/2002
- Re: What SQL syntax can I use with FreeTDS?, Bob Kline, 07/22/2002
- Re: What SQL syntax can I use with FreeTDS?, Peppi Vecchio, 07/23/2002
Archive powered by MHonArc 2.6.24.