# Snowflake: Numeric value 'X' is not recognized

**Code:** `100038` · **Category:** SQL · **Seen on:** Snowflake, SQL

A text value couldn't be converted to a number while loading or casting.

## Meaning

Find the bad values with `TRY_TO_NUMBER`/`TRY_CAST`, fix the source (empty strings, 'N/A', thousands separators, decimal commas), and use `COPY INTO ... ON_ERROR = CONTINUE` and `NULL_IF` to tolerate them. Check file format options (`FIELD_OPTIONALLY_ENCLOSED_BY`, delimiter).

## Common causes

- Empty string or text in a numeric column
- Thousands separator/currency symbol
- Wrong delimiter shifting columns
- Header row loaded as data
- Locale decimal comma

## Quick fix

1. Find rows: `SELECT * FROM t WHERE TRY_TO_NUMBER(col) IS NULL AND col IS NOT NULL`
2. Set `NULL_IF = ('', 'N/A')` in the file format
3. Fix the delimiter/header settings

## Detailed fix by platform

### SQL

1. `COPY INTO sales FROM @stage FILE_FORMAT = (TYPE = CSV SKIP_HEADER = 1 NULL_IF = ('', 'N/A') FIELD_OPTIONALLY_ENCLOSED_BY = '"') ON_ERROR = CONTINUE;`

## How to diagnose

1. **Bad value** — Which row?
2. **Delimiter** — Correct?
3. **Header** — Skipped?

---
Source: [WhatIsMyError](https://whatismyerror.com/errors/sql/snowflake-numeric-value-not-recognized)
