Hi list,
How do I use the keyword 'LIKE' in OQL Query?
The SQL query that I have is:
select * from textfile where data like '%the file%'
Now that works perfectly fine for me, but I am having trouble translating
this to OQL, I thought it should be:
SELECT * FROM com.nuix.itopix.dar.TextFile WHERE data LIKE '%$1%'
but no matter how I do this (removing the ' or %) I keep getting this
exception:
org.exolab.castor.jdo.oql.OQLSyntaxException: An inapropriate token (20) was
encountered in an expression.
at
org.exolab.castor.jdo.PersistenceException.<init>(PersistenceException.java:79)
at org.exolab.castor.jdo.QueryException.<init>(QueryException.java:64)
at
org.exolab.castor.jdo.oql.OQLSyntaxException.<init>(OQLSyntaxException.java:62)
at org.exolab.castor.jdo.oql.Parser.primaryExpr(Parser.java:671)
at org.exolab.castor.jdo.oql.Parser.postfixExpr(Parser.java:609)
at org.exolab.castor.jdo.oql.Parser.unaryExpr(Parser.java:565)
at org.exolab.castor.jdo.oql.Parser.inExpr(Parser.java:526)
Thanks in advance,
--
Victor Hadianto
---------------
Sleep is for the weak and sickly.
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev