---
title: "ascii function in Strata | Oplema"
description: "Get the Unicode code point of the first character in text as an integer. For example, ascii('Ω') returns 937. Works in a Strata Formula or Filter."
url: "https://oplema.com/docs/strata/functions/ascii"
updated: "2026-11-04"
---

# ascii

Return the Unicode number of the first character in text.

## Try an expression

In [Formula](https://oplema.com/docs/strata/prep/formula), enter the expression and set Output type to **INTEGER**.

### Expression

```
ascii('Ω')
```

### Result

```
937
```

To use your own data, replace the example values with column names. Keep format strings and other options as written.

Try it live in Formula

Result
| id | result |
| --- | --- |
| 1 | 937 |

## Arguments and types

```
ascii(string)
```

**string**

Text

Supported signatures (1)

```
ascii(string: VARCHAR) → INTEGER
```

The result type can depend on the input types. See DuckDB for the full argument rules.

## Things to know

If the first argument is missing, the result is NULL.

## Related functions

[unicode

Returns an INTEGER representing the unicode codepoint of the first character in the string.

](https://oplema.com/docs/strata/functions/unicode)[chr

Returns a character which corresponds to the ASCII code value or Unicode code point.

](https://oplema.com/docs/strata/functions/chr)[substring

Extract part of text, starting at a character position where 1 is the first character. Without a length, it continues to the end of the text.

](https://oplema.com/docs/strata/functions/substring)[substring\_grapheme

Extracts substring starting from grapheme clusters start up to the end of the string. If optional argument length is set, extracts a substring of length grapheme clusters instead. Note that a start value of 1 refers to the first character of the string.

](https://oplema.com/docs/strata/functions/substring-grapheme)

[Browse text](https://oplema.com/docs/strata/functions#text) [DuckDB documentation](https://duckdb.org/docs/current/sql/functions/text.html#asciistring)

Function metadata from DuckDB, used under the [MIT license](https://github.com/duckdb/duckdb/blob/v1.5.4/LICENSE).
