sorry for being a troll .. it's 6:30 PM here and I'm about to go home, anyway:
"SELECT a FROM com.nuix.itopix.dar.TextFile a WHERE data LIKE \"%the file%\""
--
Victor Hadianto
---------------
I do not know myself and God forbid that I should. -- Johann Wolfgang von
Goethe
On Tue, 11 Dec 2001 18:19, Victor Hadianto wrote:
> 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,
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev