freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: Mark Schaal <mark AT champ.tstonramp.com>
- To: freetds AT franklin.oit.unc.edu
- Subject: Re: 4.2 limitation...
- Date: Tue, 2 Jan 2001 11:22:28 -0800 (PST)
>
> Is there a way to sidestep the limitation of 4.2 and dynamic SQL
> placeholders?
>
> Or is there a way to use a variable in an SQL statement like this:
>
> $state="ca";
> my $sth = $dbh->prepare('SELECT * FROM authors WHERE state = $state');
>
> All of the variable syntax itterations that I know have failed...
>
> Thanks again...
>
> Mike Neuharth
Single quoted strings don't do variable interpolation in perl, try
my $sth = $dbh->prepare("SELECT * FROM authors WHERE state = $state");
Alternatively you can create a (temporary) stored procedure on the
server and then call that with the desired variables.
Hope that helps,
Mark
--
Mark J. Schaal Phone: (909) 620-7724
TST On Ramp Fax: (909) 620-8174
System Administrator E-Mail: mark AT tstonramp.com
-
4.2 limitation...,
mjn, 01/02/2001
- <Possible follow-up(s)>
- Re: 4.2 limitation..., Mark Schaal, 01/02/2001
- Re: 4.2 limitation..., Tom Samplonius, 01/02/2001
- Re: 4.2 limitation..., mjn, 01/02/2001
- Re: 4.2 limitation..., Michael Peppler, 01/02/2001
- Re: 4.2 limitation..., Roger Burton West, 01/02/2001
- Re: 4.2 limitation..., Michael Peppler, 01/02/2001
- Re: 4.2 limitation..., mjn, 01/04/2001
- Re: 4.2 limitation..., Michael Peppler, 01/04/2001
Archive powered by MHonArc 2.6.24.