Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

Re: Simplifying queries in DBI

by erix (Parson)
on Mar 16, 2014 at 16:16 UTC ( #1078525=note: print w/replies, xml ) Need Help??

in reply to Simplifying queries in DBI

Keep in mind that LIKE, to act as a substring search, needs to have % around the search value; either appended, or prepended, or on both sides (three different searches!); i.e.:

job LIKE 'trans01%' -- , or:

job LIKE '%trans01' -- , or:

job LIKE '%trans01%'

And job LIKE 'trans01' means: job equals 'trans01'. It is possible but unlikely because if you wanted equality you would normally spell it job = 'trans01'

If you use place holders: column like ( '%' || ? || '%' )

BTW, it seems you'd better forget about the ESCAPE '!' as they are not used in your statement anyway.

BTW 2: LIKE '%' doesn't do anything at all it seems so better to leave them out.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1078525]
[choroba]: marto I don't know them, but their fb page has a black avatar and background...
[marto]: #deletefacebook

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (5)
As of 2018-03-22 09:44 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (273 votes). Check out past polls.