@@ -4,7 +4,7 @@ description: "Removes the space character or other specified characters from the
44author : WilliamDAssafMSFT
55ms.author : wiassaf
66ms.reviewer : randolphwest
7- ms.date : 08/22 /2022
7+ ms.date : 09/14 /2022
88ms.prod : sql
99ms.prod_service : " database-engine, sql-database"
1010ms.technology : t-sql
@@ -44,7 +44,7 @@ TRIM ( [ characters FROM ] string )
4444Syntax for [ !INCLUDE [ sssql22-md] ( ../../includes/sssql22-md.md )] and later:
4545
4646> [ !IMPORTANT]
47- > You will need your database compatibility level set to 160 to use the LEADING, TRAILING, or BOTH keywords.
47+ > You will need your database compatibility level set to 160 to use the ` LEADING ` , ` TRAILING ` , or ` BOTH ` keywords.
4848
4949``` syntaxsql
5050TRIM ( [ LEADING | TRAILING | BOTH ] [characters FROM ] string )
@@ -139,8 +139,9 @@ In this example, only the trailing period and spaces from before `#` and after t
139139::: moniker range=">=sql-server-ver16 || >=sql-server-linux-ver16"
140140
141141### C. Remove specified characters from the start of a string
142+
142143> [ !IMPORTANT]
143- > You will need your database compatibility level set to 160 to use the LEADING, TRAILING, or BOTH keywords.
144+ > You will need your database compatibility level set to 160 to use the ` LEADING ` , ` TRAILING ` , or ` BOTH ` keywords.
144145
145146The following example removes the leading ` . ` from the start of the string before the word ` test ` .
146147
@@ -155,8 +156,9 @@ SELECT TRIM(LEADING '.,! ' FROM ' .# test .') AS Result;
155156```
156157
157158### D. Remove specified characters from the end of a string
159+
158160> [ !IMPORTANT]
159- > You will need your database compatibility level set to 160 to use the LEADING, TRAILING, or BOTH keywords.
161+ > You will need your database compatibility level set to 160 to use the ` LEADING ` , ` TRAILING ` , or ` BOTH ` keywords.
160162
161163The following example removes the trailing ` . ` from the end of the string after the word ` test ` .
162164
@@ -171,8 +173,9 @@ SELECT TRIM(TRAILING '.,! ' FROM ' .# test .') AS Result;
171173```
172174
173175### E. Remove specified characters from the beginning and end of a string
176+
174177> [ !IMPORTANT]
175- > You will need your database compatibility level set to 160 to use the LEADING, TRAILING, or BOTH keywords.
178+ > You will need your database compatibility level set to 160 to use the ` LEADING ` , ` TRAILING ` , or ` BOTH ` keywords.
176179
177180The following example removes the characters ` 123 ` from the beginning and end of the string ` 123abc123 ` .
178181
0 commit comments