You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by Ziv Yankowitz <zi...@traiana.com> on 2005/04/12 10:25:11 UTC

query on null value

Hi,

we are using OJB 1.0.1 and 
are trying to query all column in which a value is null using the ODMG Api

The query: select all from A where txt is null

the error is: txt unexpected token.

can someone please help as to what needs to be done.

Thanks Ziv.

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: query on null value

Posted by Armin Waibel <ar...@apache.org>.

Ziv Yankowitz wrote:
> Hi,
> 
> we are using OJB 1.0.1 and 
> are trying to query all column in which a value is null using the ODMG Api
> 
> The query: select all from A where txt is null
> 

query.create("select allA from " + A.class.getName() + " where 
is_undefined(txt)");

or

query.create("select allA from " + A.class.getName() + " where txt = nil");

have a look in OJB test-suite under 
db-ojb/src/test/org/apache/ojb/odmg/OQLTest.java you can find examples 
of oql-Query.

regards,
Armin


> the error is: txt unexpected token.
> 
> can someone please help as to what needs to be done.
> 
> Thanks Ziv.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
> 
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org