I am trying to find out if a SQL wildcard ('%') can be used
in a DBI script next to a placeholder.
Something like this:
$sth = $dbh->prepare( "SELECT name FROM people WHERE name LIKE ?%" );
I do this on a regular basis without needing to escape the
'%' character, but in Sybase (and I assume MS SQL Server)
, a string with a wildcard needs
to be quoted:
$sth =
$dbh->prepare( "SELECT name FROM people WHERE name LIKE 'Jones%'" );