hi how to do duplicate one target and distinct values one ta

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
harikumar
Participant
Posts: 33
Joined: Wed Apr 21, 2010 9:19 pm
Location: banglore

hi how to do duplicate one target and distinct values one ta

Post by harikumar »

hi
i have table(source) like

empno ename
10 a
20 b
10 c
30 d
20 g
30 h

i want to do output like

target1

empno ename
10 a
20 b
30 d


target2

empno ename
10 c
20 g
30 h
anbu
Premium Member
Premium Member
Posts: 596
Joined: Sat Feb 18, 2006 2:25 am
Location: india

Post by anbu »

Do you have any rules to tell particular ename to be in target1 or in target2?
You are the creator of your destiny - Swami Vivekananda
anbu
Premium Member
Premium Member
Posts: 596
Joined: Sat Feb 18, 2006 2:25 am
Location: india

Post by anbu »

You can use sort stage and set Create Change Key Column to true.

Use constraint KeyChange=1 for table1 and KeyChange=0 for table2
You are the creator of your destiny - Swami Vivekananda
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

This precise question has been asked previously, and by you, and an answer was provided.
:x
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