Need to Perform Not Equal Join

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
rajudx
Participant
Posts: 45
Joined: Tue Nov 14, 2006 1:58 pm
Location: NJ

Need to Perform Not Equal Join

Post by rajudx »

Hi,

We need to perform not equal condtion on two key cloumns.

i.e
a
----
Custno cusname
10,Jack
20.Mat
30,Salole

b
-----
custno,custname
50,Richard
30,kat
20,Mat
60,Kim

I need below output...unmatched records
50,richard
60,Kim
30,Kat

I tied to use chane capture stage and it's working but some warnnings "before" "outrec" are coming.Is there any other way we can achive above logic

Thanks,
Nag
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Not seeing any evidence that this is anything related to a web service, I moved the post here.
-craig

"You can never have too many knives" -- Logan Nine Fingers
rajudx
Participant
Posts: 45
Joined: Tue Nov 14, 2006 1:58 pm
Location: NJ

Need to Perform Not Equal Join

Post by rajudx »

Sorry this issue is related with PX only.We need to genarate unamtched recods fom two tables into one file based on some key columns.
jwiles
Premium Member
Premium Member
Posts: 1274
Joined: Sun Nov 14, 2004 8:50 pm
Contact:

Post by jwiles »

If you need to capture records from either table that are unmatched, one way to accomplish this is with a full outer join followed by a filter or transformer to capture and output unmatched records. Add a "flag" column (such as an integer 1) to each table's data prior to the join and check the flags after the join. Your conditions will be:

LeftFlag & RightFlag
1 & 1: The records matched
1 & 0 (or null): The left record didn't match...write it out
0 (or null) & 1: The right record didn't match---write it out

Regards,
- james wiles


All generalizations are false, including this one - Mark Twain.
pandeesh
Premium Member
Premium Member
Posts: 1399
Joined: Sun Oct 24, 2010 5:15 am
Location: CHENNAI, TAMIL NADU

Post by pandeesh »

'james wiles' solution is working.
pandeeswaran
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Then the original poster can mark your thread as Resolved using the green button at the top.
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