oracle - Dashes Causing SQL Trouble in DBI -
i have sql query clause typically has values including dash stored in database char(10). when explicitly call in following: $sth = $dbh->prepare("select status_code mytable acc_type = 'a-50c'"); it works , returns 1 row; if following: my $code = 'a-50c'; $sth = $dbh->prepare("select status_code mytable acc_type = ?"); $sth->execute($code); or do: my $code = 'a-50c'; $sth = $dbh->prepare("select status_code mytable acc_type = ?"); $sth->bind_param(1, $code); $sth->execute(); the query completes, no results. suspect has dash being interpretted incorrectly, can't link perl issue have printed $code variable using print "my content: $code\n"; can confirm not being strangely converted. tried including third value bind_param , if specify ora_varchar2, sql_varchar (tried possibilities) still no results. if change long form i.e. { type => sql_varchar } gives me error of dbi::st=has...