Implementation of OR Logic

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
mc_harsha
Premium Member
Premium Member
Posts: 32
Joined: Mon Mar 06, 2006 5:44 am
Location: bangalore

Implementation of OR Logic

Post by mc_harsha »

Hi,

Can you please provide me info how to implement OR condition in lookups.

Ex:

Select * from table1
where table1.col1 in (select col1 from table2) or
table1.col1 in (select col1 from table3);

Regards,
harsha
harshakumar mc
Minhajuddin
Participant
Posts: 467
Joined: Tue Mar 20, 2007 6:36 am
Location: Chennai
Contact:

Post by Minhajuddin »

You can use sparse lookups for this kind of stuff. But, again it would not be good on performance if your input data is huge...

Gotta wait for the gurus
Minhajuddin

<a href="http://feeds.feedburner.com/~r/MyExperi ... ~6/2"><img src="http://feeds.feedburner.com/MyExperienc ... lrow.3.gif" alt="My experiences with this DLROW" border="0"></a>
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Build your lookup dataset or if you are using the join stage, in your reference join, use a UNION of col1 from table2 and table3. This way you will have all your values that need to be looked up upon from your input data.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
challahari
Premium Member
Premium Member
Posts: 10
Joined: Tue Sep 25, 2007 9:38 am

Re: Implementation of OR Logic

Post by challahari »

What stages are you using to accomplish your task. We can guide you If you give us info on it.

Thanks.
Post Reply