Hi
am trying to capture duplicate records
i have sorted the records on the key
and am using the following code as stage variables.
Var = Key
flag = If Var = Var2 Then "Duplicate" Esle "NO"
Var2 = Var
But this is not giving me the results
Though i see in my debugger that var2 is retaining the old value of var the flag is always being set to Duplicate!!!!!
not sure where the problem is ???
Any help is appreciated
Thanks
Capture Duplicate Records
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 17
- Joined: Tue Apr 11, 2006 2:35 pm
Capture Duplicate Records
Deepak
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
You should get "duplicate" when the value of Key is the same as in the previous row. And, with the logic you've stated (ignoring the typo for Else) you should get "NO" when the value of Key is different from that in the previous row. If this isn't happening, check your work, particularly your stage variable names, closely.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.