Troubleshooting Guide: SQL Server Error 293 – Cannot Convert Char Value to smallmoney
Why This Error Happens
This error occurs when SQL Server attempts an implicit or explicit conversion of a character string to the smallmoney data type, but the string contains characters that do not conform to valid monetary syntax (such as multiple decimal points, invalid currency symbols, or regional formatting like commas used as decimal separators). It is frequently triggered by mismatched regional settings between the client application and the SQL Server instance, or by malformed data being passed through an ETL process, import script, or application input field. Corrupted or improperly sanitized source data (e.g., from a CSV import or linked server query) is the most common root cause in Microsoft SQL Server 2025 environments.
Step-by-Step Resolution Guide
Step 1: Identify the Offending Data Value
- Isolate the query or stored procedure causing the error by checking the SQL Server Error Log or Extended Events session for the exact statement.
- Run a validation query to find non-numeric characters, such as:
SELECT column_name FROM table_name WHERE ISNUMERIC(column_name) = 0; - Check for hidden characters like currency symbols, thousand separators, or trailing spaces using
LEN()andDATALENGTH()comparisons.
Step 2: Correct Regional and Locale Settings
- Verify the SQL Server instance collation and language settings via
SELECT SERVERPROPERTY('Collation');to ensure they match the expected decimal/comma formatting. - On Windows Server 2025, navigate to Control Panel > Region > Formats and confirm the decimal symbol matches what SQL Server expects (typically a period
.for US English installations). - Update the client connection string or application configuration to explicitly set
SET LANGUAGE us_english;before executing the conversion if mixed locales are in use.
Step 3: Sanitize and Explicitly Cast the Data
- Modify the import script or application code to strip invalid characters before conversion, using
REPLACE()to remove symbols like$,,, or extra spaces. - Use a safer conversion function instead of a direct
CASTorCONVERT, such asTRY_CONVERT(smallmoney, column_name), to gracefully handle bad rows without halting execution. - Re-run the batch insert or update statement and log any rows that return
NULLfromTRY_CONVERTfor manual review.
Step 4: Update SQL Server 2025 Cumulative Updates
- Check for the latest Cumulative Update (CU) for SQL Server 2025 via SQL Server Setup or the Microsoft Update Catalog, as data-type parsing bugs are occasionally patched.
- Apply the update using
Setup.exe /Action=Patch /IAcceptSQLServerLicenseTerms /Quietfrom an elevated Command Prompt on Windows Server 2025. - Restart the SQL Server service via
services.mscorNET STOP MSSQLSERVER && NET START MSSQLSERVERafter patching.
Alternative or Verification Steps
- To verify the fix, re-execute the original failing query or ETL job and confirm it completes without Error 293, then spot-check the target
smallmoneycolumn for accurate numeric values. - As an alternative, if the source system cannot be modified, stage the incoming data in a
VARCHARstaging table first, clean it usingTRY_CONVERT, and then perform the final insert into the production table with the properly typedsmallmoneycolumn.