Hello,

I used like by adding the wildcards to the string I was searching for

i.e. searchString = "%" + searchString + "%";

and then bound that to the OQL.

I'm not sure if it's "best practice", but it worked on SQL Server at least.

Patrick

Gray Jones wrote:

> Does anybody know what the syntax is to perform a like query?  I'm 
> trying to use the following but I get a syntax error.
>  
> Thanks,
>  
> Gray Jones
>  
> couldn't create oql query: SELECT a from com.xtriahc.user.User a 
> WHERE a.firstName like %$1
> An invalid character was found in the query at position 61

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to