Hi, I think it is not supported by castor OQL implementation. You can check
the sintax at http://castor.exolab.org/oql.html. Anyway this kind of queries
are not SQL standard. You should use another way to test your collection
size.
cheers,
Janina
On Thursday 30 January 2003 17:25, Richard Lawson wrote:
> Hi there I've been absent from this list for awhile but I hope someone can
> toss me a bone on this one.
>
> I want to test if a collection is started and would like to use the
> equivalent of "select top 1 from table where ..."
>
> The OQL-FAQ seems to indicate that the syntax should be like:
> "collectionExpr ::= first( query )"
>
> Here's my guess of how this should look:
>
> String statement =
> "first(SELECT x FROM "+ className +" x WHERE " +field+" LIKE "+
> searchString + ")";
>
> OQLQuery oqlQuery = db.getOQLQuery( statement );
>
>
> Here's the error:
> org.exolab.castor.jdo.oql.OQLSyntaxException: An incorrect token type was
> found near first (2, need 1
>
> Any ideas? Did I guess wrong on the syntax or is this not supported?
>
> cheers - rich
>
> -----------------------------------------------------------
> If you wish to unsubscribe from this mailing, send mail to
> [EMAIL PROTECTED] with a subject of:
> unsubscribe castor-dev
--
Sara Janina Rubacha
[EMAIL PROTECTED]
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev