For what it's worth, I confirm that: select tech_id, acct_number from tech_master group by acct_number having count(*) > 20;
returns 40 rows (the table has nearly 10K rows) from the SQLite shell. Same for Perl as $sql = "select tech_id, acct_number from tech_master group by acct_number having count(*) > 20"; $rs = $dbh->selectall_arrayref($sql, {Columns=>{}}); But: $maxcount = 20; $sql = "select tech_id, acct_number from tech_master group by acct_number having count(*) > ?"; $rs = $dbh->selectall_arrayref($sql, {Columns=>{}}, $maxcount); returns 0 rows (an empty array ref). All tested with Perl 5.8.4 / DBI 1.43 / DBD-SQLite 1.09 / SQLite 3.2.7 under Linux and Windows. What's not clear is whether the limitation is with SQLite, DBI, or DBD-SQLite, or whether later revisions of any has enabled placeholders at that level. Does sqlite3_prepare/step work with placeholders in the HAVING expression? Thanks! -Clark ----- Original Message ---- From: David Cantrell <[EMAIL PROTECTED]> To: sqlite-users@sqlite.org Sent: Friday, January 27, 2006 6:30:14 AM Subject: [sqlite] DBD::SQLite bug number 17292 - bounty! Yesterday I reported this bug, where placeholders don't work in HAVING clauses when using the DBD::SQLite module in perl. My lovely employers: http://www.outcometechnologies.com/ have agreed to pay a bounty to whoever can fix this and have their patch accepted by the DBD::SQLite maintainer. The bounty is GBP50 in cash. No doubt we could sort something suitable out for people not in the UK. Our interest is because we use SQLite for unit testing of some of our code. -- David Cantrell | A machine for turning tea into grumpiness