Creating Clever Constituencies

I've recently discovered a flaw in one of my nightly stored procedures which causes it to crash. This procedure was written to give Patron constituencies based on existing associations. The problem is that it will sometimes try to give a constituency of that particular type to someone who already had that constituency except that it's now inactive. The procedure is therefore crashing on a violation of PRIMARY KEY constraint, as it tries to add a new record of that customer_no and constituency (which together make the primary key for TX_CONST_CUST).

Bottom line, and possibly dumb question, I'm wondering if there's really any reason to keep inactive records in a TX table, since it seems that a lot of them don't do that (e.g. TX_CUST_KEYWORD). And, if so, it would seem that I could either delete all inactive records (e.g. where end_dt <= getdate()) of that constituency before I add them, or update the start_dt and end_dt for preexisting records accordingly.

Ideas?

Thanks, Tessiturians.

Parents
  • Hello,

    I think there are some inactive constituencies you could remove and there are others you might want to keep.  It depends on how they are being used in your organization.

    My group has a constituency for Board members and this is one that I would not delete even if it was inactive because although a customer is not currently on the board they once were and that is useful information.  It is not information that is figured into reports or list making, but that screen is read by development officers and ticket managers when they open an account and it will change the interaction with the customer.

    Jared

Reply
  • Hello,

    I think there are some inactive constituencies you could remove and there are others you might want to keep.  It depends on how they are being used in your organization.

    My group has a constituency for Board members and this is one that I would not delete even if it was inactive because although a customer is not currently on the board they once were and that is useful information.  It is not information that is figured into reports or list making, but that screen is read by development officers and ticket managers when they open an account and it will change the interaction with the customer.

    Jared

Children
No Data