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