Do any other popular databases not support exists? Any way, I guess MySQL
users get to wait a little while, because I already coded it.
-dain
----- Original Message -----
From: "Oleg Nitz" <[EMAIL PROTECTED]>
To: "Dain Sundstrom" <[EMAIL PROTECTED]>
Sent: Saturday, August 18, 2001 5:14 AM
Subject: Re[2]: [JBoss-dev] JDBC SQL Extensions
> Hi Dain,
>
> Be aware that MySQL doesn't support nested queries.
> Outer joins is more portable solution IMHO.
> BTW in Castor JDO we have "database drivers", which map OUTER JOINs
> and FOR UPDATE to all popular databases.
>
> Oleg
>
> Dain Sundstrom wrote:
> > Issue 2: IS EMPTY function. How should I map the following ejb-ql query:
>
> > SELECT OBJECT(o)
> > FROM Order o
> > WHERE o.lineItems IS EMPTY
>
> > Solution A:
>
> > SELECT o.ordernumber
> > FROM Order o
> > WHERE NOT EXISTS (
> > SELECT l.pk
> > FROM Order o, LineItem l
> > WHERE o.ordernumber = l.ordernumber)
>
> > I like this because it does not use an outer join (thanks Dave Smith).
Does
> > it have performance problems?
>
> > Solution B:
>
> > SELECT o.ordernumber
> > FROM Order o LEFT OUTER JOIN LineItem l ON o.ordernumber = l.ordernumber
> > WHERE l.ordernumber IS NULL
>
> > This would be a major pain to map to all vendors.
>
>
>
>
> > _______________________________________________
> > Jboss-development mailing list
> > [EMAIL PROTECTED]
> > http://lists.sourceforge.net/lists/listinfo/jboss-development
>
>
>
> _______________________________________________
> Jboss-development mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-development
>
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development