Page 1 of 1

Remove Duplicates from target File

Posted: Fri Aug 29, 2008 12:17 am
by monaz
I need to remove duplicates for example

I am gettin this as the output
aaa bbb ccc
aaa bbb ccc
aaa ddd fff
aaa ddd fff

Actuall output file should look like
aaa bbb ccc
aaa ddd fff

I have used the following stages
database1->Hash file
-
-
-
database2-> Sorter-> Transformer-> OUTPUT File..

Still i am not able to remove duplicate. Please advice me on this.
As i am new to datastage and i have saw some post specifies use Use Stage variable.

But how to work on stagevariable on this. or Advice some other solution

Posted: Fri Aug 29, 2008 1:18 am
by ray.wurlod
Method 1 - write to hashed file with all columns as key then read from that hashed file.

Method 2 - sort data then set up a pair of stage variables for each column, one to detect changes and one, executed after the first, to "remember" the value from the previous row.