[mailto:p...@snake.net]
Sent: Tuesday, April 05, 2016 11:37 AM
To: Vaughan, Mark
Cc: Bruce Ferrell; dbi-users@perl.org
Subject: Re: suppress quoting in prepared sql
On Apr 5, 2016, at 12:29 PM, Vaughan, Mark <mark.vaug...@neustar.biz> wrote:
This works if the number of elements remains st
[mailto:p...@snake.net]
Sent: Tuesday, April 05, 2016 11:37 AM
To: Vaughan, Mark
Cc: Bruce Ferrell; dbi-users@perl.org
Subject: Re: suppress quoting in prepared sql
On Apr 5, 2016, at 12:29 PM, Vaughan, Mark <mark.vaug...@neustar.biz> wrote:
This works if the number of elements remains st
> From: Paul DuBois [mailto:p...@snake.net]
> Sent: Tuesday, April 05, 2016 11:25 AM
> To: Bruce Ferrell <bferr...@baywinds.org>
> Cc: dbi-users@perl.org
> Subject: Re: suppress quoting in prepared sql
>
>
> > On Apr 5, 2016, at 11:55 AM, Bruce Ferrell <bferr...@bay
-Original Message-
> From: Paul DuBois [mailto:p...@snake.net]
> Sent: Tuesday, April 05, 2016 11:25 AM
> To: Bruce Ferrell <bferr...@baywinds.org>
> Cc: dbi-users@perl.org
> Subject: Re: suppress quoting in prepared sql
>
>
>> On Apr 5, 2016, at 11:55 AM, Bruce Ferr
> From: Paul DuBois [mailto:p...@snake.net]
> Sent: Tuesday, April 05, 2016 11:25 AM
> To: Bruce Ferrell <bferr...@baywinds.org>
> Cc: dbi-users@perl.org
> Subject: Re: suppress quoting in prepared sql
>
>
>> On Apr 5, 2016, at 11:55 AM, Bruce Ferrell <bf
: +1.303.802.1350 / mark.vaug...@neustar.biz
-Original Message-
From: Paul DuBois [mailto:p...@snake.net]
Sent: Tuesday, April 05, 2016 11:25 AM
To: Bruce Ferrell <bferr...@baywinds.org>
Cc: dbi-users@perl.org
Subject: Re: suppress quoting in prepared sql
> On Apr 5, 2016, at
> On Apr 5, 2016, at 11:55 AM, Bruce Ferrell wrote:
>
> Ick!
>
> ok, I have to dynamically build the IN clause of the prepare as a static sql
> statement
Yep. This is how I do it for a given array of values:
# Create a string of placeholder characters, with one ?
Excellent suggestion and exactly what I did moments before it came in.
Thanks all
On 4/5/16 9:50 AM, Geoffrey Rommel wrote
The general rule for using parameter markers ('?'s) is that a
parameter marker can appear wherever a literal can appear. (As far as
I know, this is true in any
The general rule for using parameter markers ('?'s) is that a parameter
marker can appear wherever a literal can appear. (As far as I know, this is
true in any ANSI-compliant database; it goes back to the early years of DB2
and SQL/DS.) The substituted parameters are equivalent to literals. Hence,
From the DBI documentation
(https://metacpan.org/pod/DBI#Placeholders-and-Bind-Values):
Also, placeholders can only represent single scalar values. For example, the
following statement won't work as expected for more than one value:
"SELECT name, age FROM people WHERE name IN (?)"# wrong
On Tue, April 5, 2016 09:24, Bruce Ferrell wrote:
> I'm generating a sql statement like this:
>
> sth = $mysql_dbh->prepare(
> "select sum(column) as columnSum from table where value in ( ? ) and
> row_date between cast( ? as date) and cast( ? as date) ");
>
> sth->execute( $ValueIDs
11 matches
Mail list logo