Changing Plan Owner

Hello all,

I'm trying to change the owner of a plan, specifically to migrate it from a corporate executive to the company itself. I found this thread and tried to do a simple update to T_Plans (in TEST) in SSMS with the following code:

update dbo.T_PLAN
set customer_no=165111
where plan_no=1765

but it returned the following error message:

Msg 2601, Level 14, State 1, Line 1
Cannot insert duplicate key row in object 'dbo.T_PLAN' with unique index 'UQ_T_PLAN_campaign_fund_designation_customer'. The duplicate key value is (703, 239, -1, 165111).
The statement has been terminated.

I'm wondering if there has been a change in how the table is keyed that would prevent this update from being possible, and if anyone has any other ideas on how to accomplish this change.

Thanks,

Megan

Parents
  • Former Member
    Former Member $organization

    Hi Megan,

    Is there already a plan on the new customer_no in the same campaign? Only one plan per campaign/customer combination is allowed and the error seems to indicate that you already have a plan with same campaign as the plan you're trying to move.  

    Hope that helps,

    Dorothy

  • Folks,

    A Constituent CAN have multiple Plans in the same campaign - as long as they have different Designations.

    Our Corporate training department do this a lot - where they have several plans in place, in the same Campaign with a single company.  It just means that we have had to set up a set of designations:

    • Corp1
    • Corp2
    • Corp3
    • etc.....

    So if you change the designation first, your SQL won't have a problem.

    Martin 

Reply
  • Folks,

    A Constituent CAN have multiple Plans in the same campaign - as long as they have different Designations.

    Our Corporate training department do this a lot - where they have several plans in place, in the same Campaign with a single company.  It just means that we have had to set up a set of designations:

    • Corp1
    • Corp2
    • Corp3
    • etc.....

    So if you change the designation first, your SQL won't have a problem.

    Martin 

Children