flags for duplicate records

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
mani10487
Participant
Posts: 1
Joined: Tue May 04, 2010 3:06 am

flags for duplicate records

Post by mani10487 »

hi/hello,

how to perform flag values for duplicate records..

for example if i have
empid,sal,city
100,1000,chn
101,2000,hyd
100,3000,pune in i/p stage


i should get

empid,sal,city,flag
100,1000,chn,1
101,2000,hyd,1
100,3000,pune,0

in the output.. can anyone tell me how to do this..
vinsashi
Participant
Posts: 150
Joined: Mon Aug 20, 2007 4:52 am
Location: singapore

Post by vinsashi »

use sort stage
surajkumar
Participant
Posts: 17
Joined: Wed Feb 06, 2008 5:09 am

Post by surajkumar »

use sort stage .set sort stage property --cluster key change Colum is true
SURAJKUMAR M
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

surajkumar wrote:use sort stage .set sort stage property --cluster key change Colum is true
This would be the full answer.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Althaf6553
Participant
Posts: 64
Joined: Wed Sep 26, 2007 6:52 am
Location: Syracuse ,NY

Post by Althaf6553 »

You can also find the find occurances of the record using cluster key change Column like
if cluster key change Column =1 then first occurance
Althaf
Post Reply