How to find out what is in list 2 but not in list1

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
Champa
Participant
Posts: 88
Joined: Wed Dec 14, 2005 1:44 pm

How to find out what is in list 2 but not in list1

Post by Champa »

All,

I have two lists from 2 oracle stages. I want to know how to find out what is in list 2 but not in one. Can you please let me know how to do that.

Thanks
Champa
anntaylor
Participant
Posts: 24
Joined: Tue May 10, 2005 5:17 pm

Post by anntaylor »

You could have list 1 be a lookup and have the unmatched keys go to a reject link for processing.
vmcburney
Participant
Posts: 3593
Joined: Thu Jan 23, 2003 5:25 pm
Location: Australia, Melbourne
Contact:

Post by vmcburney »

Use a transformer stage accepting both sources as input with list 2 as primary input and list 1 as a reference lookup. Join on all fields, if you have a unique primary key you can just join on those fields for faster processing. Have a single output with a constraint of list1.NOTFOUND. This will output any rows from list 2 that were not found on list 1.
sb_akarmarkar
Participant
Posts: 232
Joined: Fri Sep 30, 2005 4:52 am
Contact:

Post by sb_akarmarkar »

Outer join in user-defined SQL .....


Thanks,
Anupam
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Where are the lists once you've retrieved them from Oracle? If you write the lists of keys into two files in the &SAVEDLISTS& directory (using Sequential File stage), then you can use the LIST.DIFF command to ascertain the difference.
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