You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by Nic Werner <we...@sonoma.edu> on 2005/04/14 02:56:54 UTC
LIKE and Wildcards
Hi again,
Is there a way to use the 'like' operator and also use wildcards?
I'm trying to use Oracle with this, and the following does not work:
SELECT
*
FROM device,person
where device.owner = person.regid
<isNotEmpty prepend="AND" property="description">
description like %#description#%
(I get invalid symbol)
All examples only use the equivalent of #description# which doesn't add
anything of value, it is the equivalent of using '='.
Re: LIKE and Wildcards
Posted by Brandon Goodin <br...@gmail.com>.
you could either make that part of your input or you could use
something to the effect of
SELECT
*
FROM device,person
where device.owner = person.regid
<isNotEmpty prepend="AND" property="description">
description like '%' || #description# || '%'
Brandon
.
On 4/13/05, Nic Werner <we...@sonoma.edu> wrote:
> Hi again,
> Is there a way to use the 'like' operator and also use wildcards?
> I'm trying to use Oracle with this, and the following does not work:
>
> SELECT
> *
> FROM device,person
> where device.owner = person.regid
> <isNotEmpty prepend="AND" property="description">
> description like %#description#%
>
> (I get invalid symbol)
>
> All examples only use the equivalent of #description# which doesn't add
> anything of value, it is the equivalent of using '='.
>