Subject | Re: [firebird-support] SQL: Restrict outer join to a subset |
---|---|
Author | Martijn Tonies |
Post date | 2004-04-19T15:40:01Z |
How about...
ON (o.client_id=c.client_id AND o.OrderPlaced < '04/04/2004')
But I'm not sure if either one works :-)
With regards,
Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server.
Upscene Productions
http://www.upscene.com
> As title, I'm doing a left outer join to a table, but I only wantOR o.OrderPlaces IS NULL
> potential matches with the table from a subset. i.e.
>
> left outer join orders o
> on o.client_id=c.client_id
>
> ......where o.OrderPlaced < '04/04/2004'
> I can include this condition in the where clause, but that results inOr the join like this
> it returning zero rows should orders be empty.
ON (o.client_id=c.client_id AND o.OrderPlaced < '04/04/2004')
But I'm not sure if either one works :-)
With regards,
Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server.
Upscene Productions
http://www.upscene.com