Sounds like, because you have numeric data stored in a string column, you have bad data. One way to identify it is:

SELECT key_column, ORIGBAL
  FROM dbo.tablename
  WHERE ORIGBAL LIKE '%[^-.0-9]%';

Fix that data (it may contain commas, but probably the damage is worse than that, like some values with completely non-numeric data - otherwise cast to MONEY should have worked). If you find that a lot of rows contain commas then you can simply run an update:

UPDATE dbo.tablename SET ORIGBAL = REPLACE(ORIGBAL, ',', '');

Then run the above query again. If no rows are returned, now you can convert to "normal" numeric types instead of MONEY or FLOAT which really should be reserved for very specific scenarios IMHO.

Without fixing the data, you can make your life more complicated by using a CASE expression in all of your queries:

SELECT key_column, CONVERT(DECIMAL(12,2), CASE 
  WHEN ORIGBAL LIKE '%[^-.0-9]%' THEN ORIGBAL END
FROM dbo.tablename
...

This will yield NULL values instead of bad, non-numeric values. However it could still fail, e.g. that expression will pass for 0.0.0.44.02 which obviously can't be converted to a decimal. As an example:

DECLARE @x TABLE(ORIGBAL NVARCHAR(255));

INSERT @x VALUES('bob'),('0.0.0.44.02'),('32500.40');

SELECT ORIGBAL, [status] = CASE WHEN ORIGBAL LIKE '%[^.0-9]%' 
  THEN 'needs correcting' ELSE 'all good' END
FROM @x;

Results:

bob          needs correcting
0.0.0.44.02  all good
32500.40     all good

To identify cases with multiple decimal points, you could do:

SELECT ORIGBAL, [status] = CASE WHEN ORIGBAL LIKE '%[^.0-9]%'
  OR LEN(ORIGBAL)-LEN(REPLACE(ORIGBAL,'.','')) > 1 
  THEN 'needs correcting' ELSE 'all good' END
FROM @x;

Results:

bob          needs correcting
0.0.0.44.02  needs correcting
32500.40     all good

You still may have values that exceed the eventual convert, e.g. '12345678901234.56' is too big for DECIMAL(12,2).

In SQL Server 2012, you will have shorthand for the above expression:

SELECT key_column, TRY_CONVERT(DECIMAL(12,2), ORIGBAL)
FROM dbo.tablename
...

...which will yield NULL values even for more complex values like 0.0.0.44.02.

Answer from Aaron Bertrand on Stack Overflow
🌐
Stack Overflow
stackoverflow.com › questions › 30766304 › stored-procedure-parameters-error-converting-data-type-nvarchar-to-money
sql - Stored Procedure Parameters -> error converting data type nvarchar to money - Stack Overflow
June 10, 2015 - If I change everything to nvarchar it works perfectly. If I only change the datatype money to nvarchar I will receive the same error but with integer instead of money.
🌐
SQLServerCentral
sqlservercentral.com › forums › topic › error-converting-data-type-nvarchar-to-numeric-9
Error converting data type nvarchar to numeric – SQLServerCentral Forums
January 25, 2017 - Please post the full query, along with table DDL in the form of CREATE TABLE statement(s), sample data in the form of INSERT statements and your expected results based on the sample data. You've posted in the SQL Server 2008 forum, but if you happen to have SQL Server 2012, you could use TRY_CONVERT. I don't advise you to use ISNUMERIC - it can give unexpected results. ... Not sure what you mean by the ...the table DDL... But column - PrimaryAnswer (nvarchar(1850),null) Below is the 'original' sproc that actually works in 2012, but when run in 2008r2 (which it has to be), it fails.
Discussions

sql server 2008 - Convert NVARCHAR to MONEY or FLOAT format - Stack Overflow
My problem: I have a table (imported from Excel to SQL Server 2008) which stores numbers in NVARCHAR(255) format. Trying to convert these columns to FLOAT, MONEY, NUMERIC failed with CONVERT or w... More on stackoverflow.com
🌐 stackoverflow.com
August 21, 2013
sql - Data conversion Nvarchar to Money - Stack Overflow
I have been browsing similar issues and can't seem to get a solution. I have a file I am trying to insert into a current database format and have never had issues before. I cannot cast some value... More on stackoverflow.com
🌐 stackoverflow.com
nvarchar to money - SQL Server Forums
Microsoft SQL Server articles, forums and blogs for database administrators (DBA) and developers. More on sqlteam.com
🌐 sqlteam.com
September 21, 2018
Error converting data type nvarchar to numeric
The first query in a UNION defines the data types per column. Any subsequent query must return the same data type for each column or a data type which is implicit castable. The error message tells you, the one column in one subsequent query is of type NVARCHAR, which cannot be converted implicitly. More on learn.microsoft.com
🌐 learn.microsoft.com
4
0
🌐
Stack Overflow
stackoverflow.com › questions › 43872971 › sql-conversion-issue-between-nvarchar-and-money
sql server - SQL - conversion issue between nvarchar and money - Stack Overflow
... I would say try testing with a single value. It could be data related. ... You more than likely may have an invalid character or something not a number as part of the dataset that cannot convert.
Top answer
1 of 2
2

Sounds like, because you have numeric data stored in a string column, you have bad data. One way to identify it is:

SELECT key_column, ORIGBAL
  FROM dbo.tablename
  WHERE ORIGBAL LIKE '%[^-.0-9]%';

Fix that data (it may contain commas, but probably the damage is worse than that, like some values with completely non-numeric data - otherwise cast to MONEY should have worked). If you find that a lot of rows contain commas then you can simply run an update:

UPDATE dbo.tablename SET ORIGBAL = REPLACE(ORIGBAL, ',', '');

Then run the above query again. If no rows are returned, now you can convert to "normal" numeric types instead of MONEY or FLOAT which really should be reserved for very specific scenarios IMHO.

Without fixing the data, you can make your life more complicated by using a CASE expression in all of your queries:

SELECT key_column, CONVERT(DECIMAL(12,2), CASE 
  WHEN ORIGBAL LIKE '%[^-.0-9]%' THEN ORIGBAL END
FROM dbo.tablename
...

This will yield NULL values instead of bad, non-numeric values. However it could still fail, e.g. that expression will pass for 0.0.0.44.02 which obviously can't be converted to a decimal. As an example:

DECLARE @x TABLE(ORIGBAL NVARCHAR(255));

INSERT @x VALUES('bob'),('0.0.0.44.02'),('32500.40');

SELECT ORIGBAL, [status] = CASE WHEN ORIGBAL LIKE '%[^.0-9]%' 
  THEN 'needs correcting' ELSE 'all good' END
FROM @x;

Results:

bob          needs correcting
0.0.0.44.02  all good
32500.40     all good

To identify cases with multiple decimal points, you could do:

SELECT ORIGBAL, [status] = CASE WHEN ORIGBAL LIKE '%[^.0-9]%'
  OR LEN(ORIGBAL)-LEN(REPLACE(ORIGBAL,'.','')) > 1 
  THEN 'needs correcting' ELSE 'all good' END
FROM @x;

Results:

bob          needs correcting
0.0.0.44.02  needs correcting
32500.40     all good

You still may have values that exceed the eventual convert, e.g. '12345678901234.56' is too big for DECIMAL(12,2).

In SQL Server 2012, you will have shorthand for the above expression:

SELECT key_column, TRY_CONVERT(DECIMAL(12,2), ORIGBAL)
FROM dbo.tablename
...

...which will yield NULL values even for more complex values like 0.0.0.44.02.

2 of 2
0

CAST doesn't react well to commas and dollar signs. You might have better luck with CONVERT...

SELECT CONVERT(money, '$1,123.45')

If you have to have it in decimal, convert to money and then decimal...

SELECT CAST(CONVERT(money, '$1,123.45') AS decimal(12,2))
🌐
Stack Overflow
stackoverflow.com › questions › 51667850 › data-conversion-nvarchar-to-money
sql - Data conversion Nvarchar to Money - Stack Overflow
Treat your values as what they are, numbers, and you won't get the error. '-2.738732278E7' <> -2.738732278E7 · – Thom A Commented Aug 3, 2018 at 8:20 · Thank you. CONVERT(money, convert(float,[Amount in loc.curr.2])) all sorted! – user4242750 Commented Aug 3, 2018 at 8:26 · Add a comment | Related questions · 23 · How do I convert from a money datatype in SQL server? 2 · SQL Server converting a variable varchar field to money/decimal/something with decimal places · 2 · Convert NVARCHAR to money value ·
🌐
CopyProgramming
copyprogramming.com › howto › sql-convert-nvarchar-to-money-in-sql
Sql: Converting NVARCHAR to Money in SQL Server
June 6, 2023 - To demonstrate, declare a variable called @ConvertValue as NVARCHAR(50) and assign it the value of '£19,000,000'. Then, use the CONVERT function to convert @ConvertValue to MONEY. Finally, show activity on this post. In the event of absolute truth, it is highly likely that the items causing ...
Find elsewhere
🌐
CopyProgramming
copyprogramming.com › howto › sql-error-converting-data-type-nvarchar-to-float
Sql: Conversion of nvarchar to float type in SQL results in an error
May 18, 2023 - The error message states that there was a problem converting the value of data type from nvarchar to float. ... You are facing an issue where a particular value cannot be transformed into a float. ... It's important to mention that using float as a data type for a " price" column is not recommended ...
🌐
SQL Team
sqlteam.com › forums › topic.asp
nvarchar to money - SQL Server Forums
September 21, 2018 - Microsoft SQL Server articles, forums and blogs for database administrators (DBA) and developers.
🌐
SnapLogic
community.snaplogic.com › snaplogic - integration nation › discussions › getting the most out of the snaplogic platform › designing and running pipelines
Error converting nvarchar to decimal | SnapLogic - Integration Nation - 14624
I am trying to insert a record to SQL server which contains nvarchar and can someone help me in getting it converted to decimal because I receive the error mentioned below when I try to insert the record. Error: Error converting data type nvarchar to decimal., error code: 8114, SQL state: S0005 Also the data looks something like this:
🌐
Microsoft Learn
learn.microsoft.com › en-us › archive › msdn-technet-forums › 2e251aae-ffd4-4cac-a561-dc84d72bfc30
converting from nvarchar to money datatype | Microsoft Learn
I browsed through the values and removed any dots. Th column now has only numeric values (and commas for decimal values such as 105,8). When I try to change the datatype from nvarchar to money, following mesage is displayed: ADO error: Cannot convert a char value to money.
🌐
Tek-Tips
tek-tips.com › home › forums › software › programmers › dbms packages › microsoft sql server: programming
Arithmetic overflow error converting expression to data type money. | Tek-Tips
October 11, 2010 - Make sure that your decryption also returns the correct numeric value; you could run a simple SELECT DecryptByKey(a.[1003-Ref Salary]) FROM YourTable a and look at the values...Then try to run a SELECT CONVERT(nvarchar, DecryptByKey(a.[1003-Ref Salary])) FROM YourTable a and so on.
🌐
Microsoft Learn
learn.microsoft.com › en-us › answers › questions › 511898 › sql-server-reporting-error-converting-data-type-nv
SQL Server Reporting : error converting data type nvarchar to numeric - Microsoft Q&A
August 12, 2021 - DECLARE @lob NVARCHAR(20) = `WW` SELECT ... FROM ... WHERE [Shelf No_] IN (@lob) ORDER BY... This will help ensure there isn't an odd value in the DB table that is causing the issue. ... You can definitely force a parameter to a specific type if that is really the issue but in this case it seems like it should be correct. ... WHERE [Shelf No_] IN (CONVERT(NVARCHAR(20), @lob))
🌐
Reddit
reddit.com › r/sql › error converting data type nvarchar to numeric
r/SQL on Reddit: Error converting data type nvarchar to numeric
February 24, 2023 -

I have three tables. I am doing a join on the first 2 and then adding the third with a union. when I run the first 2 I don't get an error, and when I run the third I don't get an error either. Its only when I try to do the union that I get this error message: "SQL Error [8114] [S0005]: Error converting data type nvarchar to numeric."

The data types in joined tables 1 and 2 are the same data types as table 3. Is there a value somewhere that is causing this problem? Why am I only getting the error when trying to do the union? What is a good and fast way to find the cause of the error? Thanks

🌐
MSSQLTips
mssqltips.com › home › handling error converting data type varchar to numeric in sql server
Handling error converting data type varchar to numeric in SQL Server
September 3, 2015 - Note: The few times I (and other developers) have run across these data have all been private financial data sources. ... When receiving the error “Error converting data type varchar to numeric” and the values are clearly numeric, use this approach on the data.
🌐
C# Corner
c-sharpcorner.com › article › how-to-fix-error-converting-data-type-nvarchar-to-numeric-in-sql-server
How To Fix "Error Converting Data Type NVARCHAR to Numeric" in SQL Server
January 15, 2026 - SELECT CAST( REPLACE(REPLACE(TRIM(YourNvarcharColumn), ',', ''), '$', '') AS DECIMAL(18, 2)) FROM YourTable; Use a CASE expression to convert empty strings or invalid text to NULL or a default value.
🌐
Tableau Software
kb.tableau.com › articles › issue › error-error-converting-data-type-varchar-to-float-creating-extract-of-sql-server-data-source
Error "Error converting data type varchar to float” Creating Extract of SQL Server Data Source | Tableau Software
August 24, 2022 - If your string data values are currency, you can use rawSQL to cast the string to SQL Server's MONEY data type before casting to a number. For example: RAWSQL_REAL("CASE WHEN ISNUMERIC(%1) = 1 THEN CAST(CAST(%1 AS MONEY) AS FLOAT) END", [<Your_String_Field>]) This error occurs because SQL Server ...