How to identify the duplicate records

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
nagarjuna900
Participant
Posts: 35
Joined: Mon Dec 29, 2008 2:22 am
Location: chennai

How to identify the duplicate records

Post by nagarjuna900 »

Hi,

In source the data as follows ( having two columns).

1 AAA
2 BBB
1 AAA
3 CCC
1 AAA

The required output as follows.

1 AAA
1 AAA D ( Duplicate Record)
1 AAA D ( Duplicate Record)
2 BBB
3 CCC

( In third column the flag needs to display)

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

Post by chulett »

One way - add a Sort stage and set Create Key Change Column to True. The new column will help you identify the duplicates.
-craig

"You can never have too many knives" -- Logan Nine Fingers
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

:!: Please don't post the same question multiple times, it just tends to upset the natives. If you wanted to change the Subject you used, edit your post rather than posting it again.

Please delete your other post - you can do this as long as you do it before anyone replies to it. Edit: OK, never mind, too late for that now.
-craig

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