EJB-QL does not support like statements with input parameters:
It's to do with CMP field's data type not being known till runtime. Thus the
like comparison can only be used on string literals
Example:

SELECT OBJECT(o) FROM Orders AS o WHERE o.customer LIKE '%Bloggs%'
See no input parameters.

However JBossQL and certainly DeclaredSQL may provide a better avenue for
you to pursue if this is what you want.

Best Regards,
Anthony Geoghegan.
J2EE Developer
CPS Ireland Ltd.
----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, September 23, 2002 10:30 AM
Subject: [JBoss-user] EJB-QL For LIKE


>
> In the Oracle SQL command when we want to find data like
>
> SELECT * FROM tableName WHERE tableName.firstName LIKE 'Jo%'
>
> The result will map for all first name that first 2 char match to 'Jo'
>
> ex: 'John', 'Joe', 'Johanes', 'Johnsan', etc
>
> So what should be the ejb-ql command for the above query?
>
> -phu
>
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-user
>



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to