PSsc> Hi Alex,

PSsc> I use JBoss version 3.0.2

They present in Branch_3_0. Probably, you need to upgrade.

alex

PSsc> 09:48:35,035 INFO  [MainDeployer] Deployed package:
PSsc> file:/C:/jboss-3.0.2/server/
PSsc> default/deploy/OraTest.ear

PSsc> -phu



                                                                                       
                                           
PSsc>                     Alex Loubyansky                                              
                                                 
PSsc>                     <[EMAIL PROTECTED]>                  To:     
"[EMAIL PROTECTED]"                               
PSsc>                     Sent by:                            
<[EMAIL PROTECTED]>                                        
PSsc>                     [EMAIL PROTECTED]        cc:                      
                                                 
PSsc>                     eforge.net                          Subject:     Re[2]: 
[JBoss-user] EJB-QL For LIKE                          
PSsc>                     No Phone Info Available                                      
                                                 
                                                                                       
                                           
PSsc>                     09/24/2002 01:01 PM                                          
                                                 
PSsc>                     Please respond to jboss-user                                 
                                                 
                                                                                       
                                           
                                                                                       
                                           




PSsc> Hello Phuwarin,

PSsc> what JBoss version are you using? Looks like it misses these
PSsc> functions.

PSsc> alex

PSsc> Tuesday, September 24, 2002, 5:50:13 AM, you wrote:
PSsc>> Hi Dain,

PSsc>> I got the error message when using this command:
PSsc>>                 SELECT Object(r) FROM Role as r WHERE
PSsc> UCASE(r.roleDesc)
PSsc>> LIKE CONCAT(UCASE(?1),'%')

PSsc>> 09:21:35,125 WARN  [ServiceController] Problem starting service
PSsc>> jboss.j2ee:servi
PSsc>> ce=EJB,jndiName=RoleRemoteHome
PSsc>> org.jboss.deployment.DeploymentException: Error compiling ejbql; -
PSsc> nested
PSsc>> throwa
PSsc>> ble: (org.jboss.ejb.plugins.cmp.ejbql.ParseException: Encountered
PSsc> "ucase"
PSsc>> at lin
PSsc>> e 1, column 39.
PSsc>> Was expecting one of:
PSsc>>     "NOT" ...
PSsc>>     "(" ...
PSsc>>     <COLLECTION_VALUED_PATH> ...
PSsc>>     <STRING_VALUED_PATH> ...
PSsc>>     "CONCAT" ...
PSsc>>     "SUBSTRING" ...
PSsc>>     <BOOLEAN_VALUED_PATH> ...
PSsc>>     <DATETIME_VALUED_PATH> ...
PSsc>>     <ENTITY_VALUED_PATH> ...
PSsc>>     <IDENTIFICATION_VARIABLE> ...
PSsc>>     <NUMERIC_VALUED_PATH> ...
PSsc>>     "LENGTH" ...
PSsc>>     "LOCATE" ...
PSsc>>     "ABS" ...
PSsc>>     "SQRT" ...
PSsc>>     "+" ...
PSsc>>     "-" ...
PSsc>>     <INTEGER_LITERAL> ...
PSsc>>     <FLOATING_POINT_LITERAL> ...
PSsc>>     <NUMERIC_VALUED_PARAMETER> ...
PSsc>>     )

PSsc>> But when I remove the UCASE command, I got anther error message:
PSsc>>                 SELECT Object(r) FROM Role as r WHERE r.roleDesc LIKE
PSsc>> CONCAT(?1,'%')

PSsc>> 09:29:54,153 WARN  [ServiceController] Problem starting service
PSsc>> jboss.j2ee:servi
PSsc>> ce=EJB,jndiName=RoleRemoteHome
PSsc>> org.jboss.deployment.DeploymentException: Error compiling ejbql; -
PSsc> nested
PSsc>> throwa
PSsc>> ble: (org.jboss.ejb.plugins.cmp.ejbql.ParseException: Encountered
PSsc> "CONCAT"
PSsc>> at li
PSsc>> ne 1, column 55.
PSsc>> Was expecting:
PSsc>>     <STRING_LITERAL> ...
PSsc>>     )

PSsc>> Any suggestion or comment?

PSsc>> Thanks,
PSsc>> -phu



PSsc>>                     Dain Sundstrom
PSsc>>                     <[EMAIL PROTECTED]>                To:
PSsc> [EMAIL PROTECTED]
PSsc>>                     Sent by:                            cc:
PSsc>>                     [EMAIL PROTECTED]        Subject:
PSsc> Re: [JBoss-user] EJB-QL For LIKE
PSsc>>                     eforge.net
PSsc>>                     No Phone Info Available

PSsc>>                     09/23/2002 09:56 PM
PSsc>>                     Please respond to jboss-user






PSsc>> Anthony Geoghegan wrote:
>>> 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
PSsc>> the
>>> like comparison can only be used on string literals

PSsc>> Not really.  The spec guys wanted to support feature poor (i.e.,
PSsc> crappy)
PSsc>> datastores, so they crippled EJB-QL.  Parameters in LIKE clauses will
PSsc> be
PSsc>> supported in EJB 2.1.

>>> 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
PSsc> for
>>> you to pursue if this is what you want.

PSsc>> You can do this today in JBossQL.  I would guess you want something
PSsc> like
PSsc>> this:

PSsc>> SELECT Object(t)
PSsc>> FROM tableName t
PSsc>> WHERE UCASE(t.firstName) LIKE CONCAT(UCASE(?1), '%')

PSsc>> -dain




-------------------------------------------------------
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