Merge Fail Error Message

Hello Friends,

I have a handful of accounts that I have been trying to merge for the past few weeks but I keep getting the same error message and I'm not sure what the problem is. Does anyone know what this error message means?

The error message: Error 512, Severity 16, State 1,
Procedure LP_CONST_MERGE, Line 49, Subquery returned more than 1 value.

Thanks in advance!

  • Hello Autumn,

    The referenced stored procedure, LP_CONST_MERGE, is a container for custom code for validating customer merges.  Yours has quite a bit of logic, but my best guess is that it's happening right at the top:

    declare @identify_method int
    select @identify_method = (select identify_method from T_POTENTIAL_DUPS where customer_no = @kept_id)

    If the same @kept_id customer_no exists twice in T_POTENTIAL_DUPS, it's going to be trying to stuff multiple identify_methods into that variable.  Try a max(identify_method) or min(identify_method), or a SELECT TOP 1 identify_method  in that spot instead.

    If you need consulting help to edit this stored procedure, open up a help ticket and we'll get you connected to the help you need.

    Regards,

    Brian Pedaci
    Senior Technical Analyst
    Tessitura Network Support