I have two tables table1 and table2.Lookup stage is used between table1 and table2.table1 is master link.In lookup stage we have following properties
Condition is table2.Col2='ABC',condition not met=Continue and Lookup failure=Drop.
I want to convert above logic to sql.Any body help on this.I know how to implement Lookup failure=Drop(Inner join) but not sure how to implement Condition is table2.Col2='ABC',condition not met=Continue in sql query
Lookup Condition
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 1735
- Joined: Thu Mar 01, 2007 5:44 am
- Location: Troy, MI
Although its a straight forward answer, But I would like to know if you have given any thoughts on this, or if it is a Interview Question.
Why not look at the records in the output for those records which doesn't meet the condition criteria.
Why not look at the records in the output for those records which doesn't meet the condition criteria.
Priyadarshi Kunal
Genius may have its limitations, but stupidity is not thus handicapped.![Wink :wink:](./images/smilies/icon_wink.gif)
Genius may have its limitations, but stupidity is not thus handicapped.
![Wink :wink:](./images/smilies/icon_wink.gif)
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Consider the behaviour of the Lookup stage when the Lookup Failed rule is Continue.
With Lookup Failed set to Drop and Condition Not Met set to Continue, the same behaviour will obtain for records in which the condition is not met. However, the condition can not use data from the reference input link, for obvious reasons.
With Lookup Failed set to Drop and Condition Not Met set to Continue, the same behaviour will obtain for records in which the condition is not met. However, the condition can not use data from the reference input link, for obvious reasons.
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: 43
- Joined: Wed Feb 12, 2014 12:34 pm
- Location: Hyderabad, India
Re: Lookup Condition
I think this is the answer
select *from table1 t1
inner join table t2
on t1.col1=t2.col1
where col1 - lookup column & as condition t2.col2='ABC' is not dropping any record it is not required in query.
select *from table1 t1
inner join table t2
on t1.col1=t2.col1
where col1 - lookup column & as condition t2.col2='ABC' is not dropping any record it is not required in query.
SyedMuhammadMehdi
-
- Participant
- Posts: 32
- Joined: Fri Nov 07, 2014 11:18 am