Subject | Re: [firebird-support] is there a way around the IN clause? |
---|---|
Author | Martijn Tonies |
Post date | 2004-09-09T09:03:40Z |
Hi,
and orders.customerlink = c.link
Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server.
Upscene Productions
http://www.upscene.com
> >selectDoes adding this help:
> >c.name, c.surname, c.telephone, c.lastorderdate
> >from customers c
> >where NOT EXISTS (
> > select customerlink from orders
> > where
> > recdate > '01-jan-2004' and
> > recdate < '01-feb-2004' and
> > branchcode = 'SAN'
and orders.customerlink = c.link
> >)With regards,
> >and c.branchcode = 'SAN'
> >order by
> >c.lastorderdate desc,1,2
> Luc, this is fast (0.3s) but it doesn't return any data? How does the NOT
> EXISTS clause work?
>
> Martijn and Daniel, I think there may be an issue with PLAN chosen. I am
> going to try some manual plans and see what happens if I cant figure out
> Lucs idea
Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server.
Upscene Productions
http://www.upscene.com