Perform join on multiple columns with OR condition

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
shahidbakshi
Participant
Posts: 19
Joined: Tue Jun 05, 2007 4:43 am
Location: mumbai
Contact:

Perform join on multiple columns with OR condition

Post by shahidbakshi »

Hi All,
need some help rgd data stage PX.
If S1 and S9 are two data sets, and we want to join those on the follwoing conidtion and need some output.

S1.OI_TEXT_REFER = S9.TEXTID OR S1.LI_TEXT_ID = S9.TEXTID OR S1.PO_SHIP_TEXT_ID = S9.TEXTID OR S1.PO_TEXT_ID = S9.TEXTID OR S1.CT_SHIP_TEXT_ID = S9.TEXTID OR S1.CT_TEXT_ID = S9.TEXTID

How to perform that.
Shahid.Bakshi
Mumbai
pradeep_nov18
Participant
Posts: 92
Joined: Wed Mar 05, 2008 4:09 am
Location: chennai
Contact:

Re: Perform join on multiple columns with OR condition

Post by pradeep_nov18 »

[quote="shahidbakshi"]Hi All,
need some help rgd data stage PX.
If S1 and S9 are two data sets, and we want to join those on the follwoing conidtion and need some output.

S1.OI_TEXT_REFER = S9.TEXTID OR S1.LI_TEXT_ID = S9.TEXTID OR S1.PO_SHIP_TEXT_ID = S9.TEXTID OR S1.PO_TEXT_ID = S9.TEXTID OR S1.CT_SHIP_TEXT_ID = S9.TEXTID OR S1.CT_TEXT_ID = S9.TEXTID

I think you can perform in lookup stage by giving the lookup condition, Perform lookup on one common column for both dataset
pradeep.v
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You can do it with six separate reference inputs to the Lookup stage.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
shahidbakshi
Participant
Posts: 19
Joined: Tue Jun 05, 2007 4:43 am
Location: mumbai
Contact:

Re: Perform join on multiple columns with OR condition

Post by shahidbakshi »

pradeep_nov18 wrote:
shahidbakshi wrote:Hi All,
need some help rgd data stage PX.
If S1 and S9 are two data sets, and we want to join those on the follwoing conidtion and need some output.

S1.OI_TEXT_REFER = S9.TEXTID OR S1.LI_TEXT_ID = S9.TEXTID OR S1.PO_SHIP_TEXT_ID = S9.TEXTID OR S1.PO_TEXT_ID = S9.TEXTID OR S1.CT_SHIP_TEXT_ID = S9.TEXTID OR S1.CT_TEXT_ID = S9.TEXTID

I think you can perform in lookup stage by giving the lookup condition, Perform lookup on one common column for both dataset
In lookup condtion we only get the primary links column not refrenced link columns, so I don't think so anything can be done by that.
Shahid.Bakshi
Mumbai
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Rot. You get KEY columns (unless you have a Lookup File Set on the other end). In this context this means "search key", not "primary key".
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply