in reply to Quoting in DBI sql query for on the fly query
Did you actually look at the SQL in $sqlstatement? It often helps when debugging to look at the values held in variables. Modules such as Data::Dumper are a great help in this regard.
rdfield
In Section
Seekers of Perl Wisdom