Agree with PJM. On top of all that, a field named "IsMandatory" sounds like a boolean field (yes/no, true/false), so it sounds like you are saying that a duplicate is *ANY* record where "IsMandatory" is true (or false, whatever your logic).
I don't see how you can possibly mean that, for real.
Show some sample data, at a minimum.
|