Finding Distinct Value

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
ani_chutti@yahoo.co.in
Participant
Posts: 3
Joined: Tue Jul 28, 2015 3:53 am

Finding Distinct Value

Post by ani_chutti@yahoo.co.in »

Dear All, I have two seq files 1 & 2. I want to get the distinct value in Seq file 1 which is NOT in Seq 2. I mean

Seq 1 : 10,20,30,40
Seq 2 : 10,30,50,60
My output should show only 20,40

Pl let me know job design. I dont need the common values between two files
Anitha
rkashyap
Premium Member
Premium Member
Posts: 532
Joined: Fri Dec 02, 2011 12:02 pm
Location: Richmond VA

Post by rkashyap »

If key-values in Seq1 and Seq1 are in a single row, then first Pivot them to create one row per key.

Subsequently in Lookup Stage ... use Seq1 as primary link, Seq2 as reference lookup ... Rejects will have values from Seq1 which is not present in Seq2.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

So... a hashed file lookup since there's no 'Lookup stage' in a Server job. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply