Subject | RE: [firebird-support] SQL: Restrict outer join to a subset |
---|---|
Author | Louis Kleiman |
Post date | 2004-04-19T15:44:39Z |
Looks to me like you can simple put your WHERE clause into your ON clause:
left outer join orders o
on o.client_id=c.client_id and o.OrderPlaced < '04/04/2004'
Louis Kleiman
SSTMS, Inc.
_____
From: tickerboo2002 [mailto:support@...]
Sent: Monday, April 19, 2004 11:27 AM
To: firebird-support@yahoogroups.com
Subject: [firebird-support] SQL: Restrict outer join to a subset
As title, I'm doing a left outer join to a table, but I only want
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 in
it returning zero rows should orders be empty.
_____
Yahoo! Groups Links
* To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-support/
* To unsubscribe from this group, send an email to:
firebird-support-unsubscribe@yahoogroups.com
<mailto:firebird-support-unsubscribe@yahoogroups.com?subject=Unsubscribe>
* Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service
<http://docs.yahoo.com/info/terms/> .
[Non-text portions of this message have been removed]
left outer join orders o
on o.client_id=c.client_id and o.OrderPlaced < '04/04/2004'
Louis Kleiman
SSTMS, Inc.
_____
From: tickerboo2002 [mailto:support@...]
Sent: Monday, April 19, 2004 11:27 AM
To: firebird-support@yahoogroups.com
Subject: [firebird-support] SQL: Restrict outer join to a subset
As title, I'm doing a left outer join to a table, but I only want
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 in
it returning zero rows should orders be empty.
_____
Yahoo! Groups Links
* To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-support/
* To unsubscribe from this group, send an email to:
firebird-support-unsubscribe@yahoogroups.com
<mailto:firebird-support-unsubscribe@yahoogroups.com?subject=Unsubscribe>
* Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service
<http://docs.yahoo.com/info/terms/> .
[Non-text portions of this message have been removed]