"OR" in a join
Moderators: chulett, rschirm, roy
"OR" in a join
Is there a way to incorporate an "OR" condition within a JOIN stage (or lookup)?
Re: "OR" in a join
Can you please explain a bit more elaborately as to what your requirement is?
DD
Success is right around the corner
Success is right around the corner
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Even so, the answer is no in a Join stage. In a Lookup stage you have the possibility of a range lookup but that's a highly specific case of "OR". As noted, please be more specific.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom
Okay.
One of the ways you can achieve this is to do a lookup first (this will depend on your data volumes)
Then send the rejects from the first lookup to a second lookup stage where you use the same reference dataset.
You can then Funnel the outputs from both the lookup and proceed with any other transformations that you may have.
The first lookup will cater to your first constraint and the second lookup will cater to the second constraint in your "OR" statement.
Let me know if this works.
One of the ways you can achieve this is to do a lookup first (this will depend on your data volumes)
Then send the rejects from the first lookup to a second lookup stage where you use the same reference dataset.
You can then Funnel the outputs from both the lookup and proceed with any other transformations that you may have.
The first lookup will cater to your first constraint and the second lookup will cater to the second constraint in your "OR" statement.
Let me know if this works.
jherr22 wrote:I would like to replicate the following:
select x.a, y.b
from x, y
where x.m = y.m
or x.n = y.n
DD
Success is right around the corner
Success is right around the corner