PRINT N'Updating AttributeValue from [ManagedElementAttributeData] - set Arithmetic overflow data to 0 for all bigint...'
GO
UPDATE d SET d.[NumericValue] = 0 FROM [ManagedElementAttributeData] d 
JOIN [ManagedElementAttributeType] y ON d.[ManagedElementAttributeTypeGuid] = y.[ManagedElementAttributeTypeGuid]
WHERE [SqlDataType] = 'bigint' AND d.[NumericValue] IS NOT NULL AND convert(decimal(20,0), d.[NumericValue]) > convert(decimal(20,0), 9223372036854773800)
GO