Hi All,
code:-
Discussion posts and replies are publicly visible
If your intent is to make sure the 'customerId' field is unique, you should *REALLY* consider enforcing this constraint on the front-end instead of trying to bend over backwards and use DB write trickery and/or involve super complex stuff like composite primary keys, stored procedures, etc.
Let's drill back up on this a bit. Under what circumstances would Customer ID be potentially duplicate? Is this hand-entered by a user or generated by internal logic somehow? If user-entered, all you need is to add on-form validation. If it's system-generated, then i guess my question is, why is this case possible?