data67 has asked for the wisdom of the Perl Monks concerning the following question:
my $sql = SQL::Abstract->new(cmp => 'like'); #my $sql = SQL::Abstract->new(case => 'lower', cmp => 'like'); my @fields = qw/company_number short_company_name country_code long_co +mpany_name company_stock_symbol_description company_state_province_name company_c +ity_name company_web_address_description/; # check hash for values first! my($stmt, @bind) = $sql->select('company', \@fields, \%HoH); my $sth = $dbh_essweb->prepare($stmt); $sth->trace(4, "Xtrace.log"); $sth->execute(@bind);
I want he sql to look like:
I am affraid the SQL::abstract module is not generating the percent signs around the search pattern.Select blah from tablename where column_name like '%search pattern%'
Can anyone give me some tips on what i am doing wrong? Thanks
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: SQL::Abstract not working right
by jdtoronto (Prior) on Oct 10, 2006 at 15:52 UTC | |
by data67 (Monk) on Oct 10, 2006 at 20:36 UTC |