Quicking looking at the spec this is not even supported though this does
work in the cmp engine I am using.

Regards,

William

-----Original Message-----
From: A mailing list for Enterprise JavaBeans development
[mailto:[EMAIL PROTECTED]] On Behalf Of William Louth
Sent: 21 August 2002 11:03
To: [EMAIL PROTECTED]
Subject: Re: EJB QL query with LIKE operator


'?3%' This will not work as the parameter is enclosed.

If you application servers cmp implementation does not allow
parameterization (which I find stange) then

COLUMN LIKE CONCAT(?3,'%')

Regards,

William Louth
Architect of JDBInsight - "Tune with Insight"
www.jinspired.com


-----Original Message-----
From: A mailing list for Enterprise JavaBeans development
[mailto:[EMAIL PROTECTED]] On Behalf Of Fred Loney
Sent: 20 August 2002 16:04
To: [EMAIL PROTECTED]
Subject: Re: EJB QL query with LIKE operator


A LIKE operand cannot be parameterized.

Fred Loney
Spirited Software, Inc.
www.spiritedsw.com

----- Original Message -----
From: "Dries De Moor" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, August 20, 2002 7:13 AM
Subject: EJB QL query with LIKE operator


> Hello,
>
> I having the following problem.
> A table named test with 3 colums A,B and C (VARCHAR type)
> I write a CMP entity bean. Because I want the user to search throught
this data I provide a findTest(paramA, paramB, paramC)
> I don't know which fields the user will enter and I don't want to
check on it because you have several possibilties.
> So the query I define is like:
> SELECT OBJECT(b) FROM test AS b WHERE (b.ColumnA LIKE '?1%') AND
(b.ColumnB LIKE '?3%') AND (b.ColumnC LIKE '?3%')
>
> If I generate SQL statement with the deploytool of Suns reference
implementation it doesn't show out any  error.
> When I run the client application and I do a search I always get 0
results back.
> Can somebody tell me if the EJB QL is correct and if not give a
solution?
>
>
> Thanks a lot
>
> Dries
>
>
========================================================================
===
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
> of the message "signoff EJB-INTEREST".  For general help, send email
to
> [EMAIL PROTECTED] and include in the body of the message "help".
>
>

========================================================================
===
To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body of the message "signoff EJB-INTEREST".  For general help, send
email to [EMAIL PROTECTED] and include in the body of the message
"help".

========================================================================
===
To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body of the message "signoff EJB-INTEREST".  For general help, send
email to [EMAIL PROTECTED] and include in the body of the message
"help".

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to