Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ Current support:

* [MariaDB](/refguide/mysql/): 10.6, 10.11, 11.4, 11.8
* [Microsoft SQL Server](/developerportal/deploy/mendix-on-windows-microsoft-sql-server/): 2022, 2025
* [Azure SQL](https://docs.microsoft.com/en-us/sql/t-sql/statements/alter-database-transact-sql-compatibility-level?view=sql-server-2017): v12 compatibility mode 140 or higher
* [Azure SQL](https://learn.microsoft.com/en-us/sql/t-sql/statements/alter-database-transact-sql-compatibility-level?view=sql-server-ver17): v12 compatibility mode 160 or higher
* [MySQL](/refguide/mysql/): 8.4
* [Oracle Database](/refguide/oracle/): 19, 21c, 23ai (including 26ai)
* PostgreSQL: 13, 14, 15, 16, 17, 18
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -692,10 +692,13 @@ These are the currently supported functions:
* LENGTH
* LOCATE
* LOWER
* LTRIM
* RANGEBEGIN
* RANGEEND
* REPLACE
* ROUND
* RTRIM
* TRIM
* UPPER

### CAST{#cast}
Expand Down Expand Up @@ -1329,6 +1332,41 @@ SELECT * FROM Sales.Customer WHERE LOWER(LastName) = 'doe'
This query can no longer take advantage of an index for `LastName` for comparison, resulting in a performance decrease.
{{% /alert %}}

### LTRIM{#ltrim}

Removes leading characters from a `string`. If no `character` is specified for trimming, space is used.

#### Syntax

The syntax is as follows:

```sql
LTRIM ( expression [, character ] )
```

##### expression

`expression` is any string expression to be trimmed. If `expression` is `NULL`, the function will return `NULL`.

##### character

`character` is an optional single character string expression containing the character to trim. If omitted, the space character is used instead.

{{% alert color="info" %}}
Only a single character is supported. `character` parameters with more than one character may not work in all supported databases.
{{% /alert %}}

#### Examples

```sql
SELECT LTRIM(LastName, 'D') FROM Sales.Order WHERE Price = 1.50000001
```

| LastName |
|:---------|
| oe |
| Moose |

### Ranges in Datasets

{{% alert color="info" %}}
Expand Down Expand Up @@ -1507,6 +1545,41 @@ SELECT ROUND((Price : 7), 2) as RoundedPrice, Price : 7 FROM Sales.Order
| 0.33 | 3.33333333 |
| 1.17 | 1.17142857 |

### RTRIM{#rtrim}

Removes trailing characters from a `string`. If no `character` is specified for trimming, space is used.

#### Syntax

The syntax is as follows:

```sql
RTRIM ( expression [, character ] )
```

##### expression

`expression` is any string expression to be trimmed. If `expression` is `NULL`, the function will return `NULL`.

##### character

`character` is an optional single character string expression containing the character to trim. If omitted, the space character is used instead.

{{% alert color="info" %}}
Only a single character is supported. `character` parameters with more than one character may not work in all supported databases.
{{% /alert %}}

#### Examples

```sql
SELECT RTRIM(LastName, 'e') FROM Sales.Order WHERE Price = 1.50000001
```

| LastName |
|:---------|
| Do |
| Moos |

### SUBSTRING{#substring-function}

#### Description
Expand Down Expand Up @@ -1559,6 +1632,41 @@ ORDER BY LastName LIMIT 1
|:-------------|:---------------|:----------------|:-----------------|
| logical | logic | logical | *(empty string)* |

### TRIM{#trim}

Removes leading and trailing characters from a `string`. If no `character` is specified for trimming, space is used.

#### Syntax

The syntax is as follows:

```sql
TRIM ( expression [, character ] )
```

##### expression

`expression` is any string expression to be trimmed. If `expression` is `NULL`, the function will return `NULL`.

##### character

`character` is an optional single character string expression containing the character to trim. If omitted, the space character is used instead.

{{% alert color="info" %}}
Only a single character is supported. `character` parameters with more than one character may not work in all supported databases.
{{% /alert %}}

#### Examples

```sql
SELECT TRIM(TRIM(LastName, 'e'), 'D') FROM Sales.Order WHERE Price = 1.50000001
```

| LastName |
|:---------|
| o |
| Moos |

### UPPER

Converts all lowercase characters in a given string to uppercase. Opposite of [LOWER](#lower-function).
Expand Down