Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

Commit 64acac2

Browse files
authored
Update trim-transact-sql.md
@rwestMSFT
1 parent e48f450 commit 64acac2

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

docs/t-sql/functions/trim-transact-sql.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ TRIM ( [ characters FROM ] string )
4141
::: moniker-end
4242

4343
::: moniker range=">=sql-server-ver16 || >=sql-server-linux-ver16"
44+
> [!IMPORTANT]
45+
> You will need your database compatibility level set to 160 to use the LEADING, TRAILING, or BOTH keywords.
46+
4447
Syntax for [!INCLUDE [sssql22-md](../../includes/sssql22-md.md)] and later:
4548

4649
```syntaxsql
@@ -136,6 +139,8 @@ In this example, only the trailing period and spaces from before `#` and after t
136139
::: moniker range=">=sql-server-ver16 || >=sql-server-linux-ver16"
137140

138141
### C. Remove specified characters from the start of a string
142+
> [!IMPORTANT]
143+
> You will need your database compatibility level set to 160 to use the LEADING, TRAILING, or BOTH keywords.
139144
140145
The following example removes the leading `.` from the start of the string before the word `test`.
141146

@@ -150,6 +155,8 @@ SELECT TRIM(LEADING '.,! ' FROM ' .# test .') AS Result;
150155
```
151156

152157
### D. Remove specified characters from the end of a string
158+
> [!IMPORTANT]
159+
> You will need your database compatibility level set to 160 to use the LEADING, TRAILING, or BOTH keywords.
153160
154161
The following example removes the trailing `.` from the end of the string after the word `test`.
155162

@@ -164,6 +171,8 @@ SELECT TRIM(TRAILING '.,! ' FROM ' .# test .') AS Result;
164171
```
165172

166173
### E. Remove specified characters from the beginning and end of a string
174+
> [!IMPORTANT]
175+
> You will need your database compatibility level set to 160 to use the LEADING, TRAILING, or BOTH keywords.
167176
168177
The following example removes the characters `123` from the beginning and end of the string `123abc123`.
169178

0 commit comments

Comments
 (0)