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

  • Aha! It did have another plan in the same campaign. This solved it. I took screengrabs of the steps in the corporate campaign (there were only two), and then I deleted that campaign. Once I did that, the SQL update went through without a hitch. I then pulled up my screengrabs and added the steps back in.

Reply Children