diff --git a/content/en/docs/refguide/installation/system-requirements.md b/content/en/docs/refguide/installation/system-requirements.md index 751205c078d..e467aa9bd0e 100644 --- a/content/en/docs/refguide/installation/system-requirements.md +++ b/content/en/docs/refguide/installation/system-requirements.md @@ -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 diff --git a/content/en/docs/refguide/modeling/domain-model/oql/_index.md b/content/en/docs/refguide/modeling/domain-model/oql/_index.md index 15b0cc0336c..a0cc36b4045 100644 --- a/content/en/docs/refguide/modeling/domain-model/oql/_index.md +++ b/content/en/docs/refguide/modeling/domain-model/oql/_index.md @@ -46,8 +46,11 @@ OQL is under constant development so some expressions and features are not avail | DATEPARSE | 11.10.0 | | DATETRUNC | 11.9.0 | | LOCATE | 11.9.0 | +| LTRIM | 11.11.0 | +| RTRIM | 11.11.0 | | STRING_AGG in View Entities and Datasets | 11.2.0 | | SUBSTRING | 11.9.0 | +| TRIM | 11.11.0 | ### [OQL Statements](/refguide/oql-statements/){#statement-versions} diff --git a/content/en/docs/refguide/modeling/domain-model/oql/oql-expression-syntax.md b/content/en/docs/refguide/modeling/domain-model/oql/oql-expression-syntax.md index afce4e213a1..44128164959 100644 --- a/content/en/docs/refguide/modeling/domain-model/oql/oql-expression-syntax.md +++ b/content/en/docs/refguide/modeling/domain-model/oql/oql-expression-syntax.md @@ -692,10 +692,13 @@ These are the currently supported functions: * LENGTH * LOCATE * LOWER +* LTRIM * RANGEBEGIN * RANGEEND * REPLACE * ROUND +* RTRIM +* TRIM * UPPER ### CAST{#cast} @@ -1329,6 +1332,47 @@ 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 one or more leading characters from a `string`. If no character is specified for trimming, space is used. + +{{% alert color="info" %}} +This function was introduced in Mendix version 11.11.0. +{{% /alert %}} + +#### 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 remove from the start of the string. 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 %}} + +If the expression string consists entirely of `character`, everything will be trimmed and the function will return a zero-length string. + +#### Examples + +```sql +SELECT LTRIM(LastName, 'D') FROM Sales.Order WHERE Price = 1.50000001 +``` + +| LastName | +|:---------| +| oe | +| Moose | + ### Ranges in Datasets {{% alert color="info" %}} @@ -1507,6 +1551,47 @@ SELECT ROUND((Price : 7), 2) as RoundedPrice, Price : 7 FROM Sales.Order | 0.33 | 3.33333333 | | 1.17 | 1.17142857 | +### RTRIM{#rtrim} + +Removes one or more trailing characters from a `string`. If no `character` is specified for trimming, space is used. + +{{% alert color="info" %}} +This function was introduced in Mendix version 11.11.0. +{{% /alert %}} + +#### 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 remove from the end of the string. 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 %}} + +If the expression string consists entirely of `character`, everything will be trimmed and the function will return a zero-length string. + +#### Examples + +```sql +SELECT RTRIM(LastName, 'e') FROM Sales.Order WHERE Price = 1.50000001 +``` + +| LastName | +|:---------| +| Do | +| Moos | + ### SUBSTRING{#substring-function} #### Description @@ -1559,6 +1644,47 @@ ORDER BY LastName LIMIT 1 |:-------------|:---------------|:----------------|:-----------------| | logical | logic | logical | *(empty string)* | +### TRIM{#trim} + +Removes one or more leading and trailing characters from a `string`. If no `character` is specified for trimming, space is used. + +{{% alert color="info" %}} +This function was introduced in Mendix version 11.11.0. +{{% /alert %}} + +#### 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 which will be removed from the beginning and end of the string. If omitted, the space character is used. + +{{% alert color="info" %}} +Only a single character is supported. `character` parameters with more than one character may not work in all supported databases. +{{% /alert %}} + +If the expression string consists entirely of `character`, everything will be trimmed and the function will return a zero-length string. + +#### 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).