---
title: "Error when running the Assay Ranking Process: Arithmetic overflow error converting nvarchar to data type numeric"
canonical: "https://servicedesk.maxgeo.com/space/MDS/1043333121/Error%20when%20running%20the%20Assay%20Ranking%20Process%3A%20Arithmetic%20overflow%20error%20converting%20nvarchar%20to%20data%20type%20numeric"
format: markdown
---
Error Message

DataShed4:

*Arithmetic overflow error converting nvarchar to data type numeric*

![image](media://7c4923ad-05f1-46da-b1d7-c1af381533e7)

SQL Server:

*Msg 50000, Level 16, State 1, Procedure dbo.usp_DataAssayRankingProcess, Line 108 [Batch Start Line 2] Error converting data type nvarchar to numeric.* Edited

![image](media://fde9f80a-3291-4579-b212-ff4cd5e38dc1)


Fixes

- someone mapped the AssayResult field (nvarchar(20) instead of sysResult field in the RH norm for one or more elements. Now it's trying to write the nvarchar field to the decimal fields in assayflat.
- due to non-alphanumeric characters in an assay result with no substitution set up. Try this to find it:
  


> ⚠️ DB Modification
> ⚠️ 
> ⚠️ Before any change is made to a user database (or system), maxgeo recommends competent staff should follow all standard database change management practices and never make untested changes to a production database.  
> ⚠️ Change, test and document all modifications on a test copy of your database to ensure results are as expected before implementing them on your live database. Always ensure a full backup is available in case rollback is required and follow all company change management procedures and practices.