OQL queries are different from sql.

You need to do something more like:

query.create("select ANYTHING from " + YOURCLASS.class.getName() +" where
id=null");

ANYTHING is ignored as far as I can tell so you really can put anything!
YOURCLASS is the name of the class you are querying (NOT THE TABLE!!!).

I'm not exactly sure of how to check for nulls in OQL, so field=null may not
work.

Hope this helps,
Daniel.


-----Original Message-----
From: R�mi Bars [mailto:[EMAIL PROTECTED]
Sent: 25 February 2004 11:05
To: OJB Users List
Subject: Re: OQLQuery


when i put (select * from table where id is null)
 i got this message :
 line 1:107: unexpected token: id

Remi

----- Original Message -----
From: "R�mi Bars" <[EMAIL PROTECTED]>
To: "OJB Users List" <[EMAIL PROTECTED]>
Sent: Wednesday, February 25, 2004 11:44 AM
Subject: OQLQuery


> i all i create a oqlQuery like this
>
> OQLQuery query = odmg.newOQLQuery();
>
>         // 2. set the OQL select statement
>         query.create(select * from table where id=null)
>
> when i try this i got this message :
>
> line 1:120: unexpected token: null
>
> what is wrong?
>
> Thank
>
> remi
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to