Error logging in to a newly upgraded database - duplicate key value supplied

Problem

When logging into a newly upgraded database and error is report ' Error. Add Duplicate Key value supplied'

Solution

SQL skills are required

A good knowledge of SQL Management Studio is required to complete this task

The problem is duplicate entries in SY_SysValues table.  Run the following query to identify the duplicates:

SELECT * FROM SY_SysValues WHERE IDKey IN (SELECT IDKey FROM SY_SysValues GROUP BY IDKey, Section HAVING COUNT(IDKey) > 1)

Select one of the duplicates and issue a SQL query to delete it.