Skip to content

Commit 4efb74e

Browse files
authored
translate-transact-sql.md - Spelling, Grammar, Wording
The document was quite poorly worded. It contained spelling errors, and read like broken English. It also contained statements that weren't true; if NULL is passed for any parameter, then NULL is returned, however the document states the opposite. The word "should" in the document implies that something isn't always the case. For example "he behavior of the TRANSLATE function should be identical to the REPLACE function. " If TRANSLATE doesn't always operate like REPLACE, when does it not? It's not that TRANSLATE should, it does. I've also removed the repetition of this statement.
1 parent 9e722cc commit 4efb74e

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

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

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ monikerRange: ">=sql-server-2017||=sqlallproducts-allversions||>=sql-server-linu
2121
# TRANSLATE (Transact-SQL)
2222
[!INCLUDE[tsql-appliesto-ss2017-xxxx-xxxx-xxx-md](../../includes/tsql-appliesto-ss2017-xxxx-xxxx-xxx-md.md)]
2323

24-
Returns the string provided as a first argument after some characters specified in the second argument are translated into a destination set of characters.
24+
Returns the string provided as a first argument after some characters specified in the second argument are translated into a destination set of characters specified in the third argument.
2525

2626
## Syntax
2727
```
@@ -30,23 +30,23 @@ TRANSLATE ( inputString, characters, translations)
3030

3131
## Arguments
3232

33-
inputString
34-
Is an [expression](../../t-sql/language-elements/expressions-transact-sql.md) of any character type (nvarchar, varchar, nchar, char).
33+
*inputString*
34+
Is the string [expression](../../t-sql/language-elements/expressions-transact-sql.md) to be searched. *inputString* can be any character data type (nvarchar, varchar, nchar, char).
3535

36-
characters
37-
Is a [expression](../../t-sql/language-elements/expressions-transact-sql.md) of any character type containing characters that should be replaced.
36+
*characters*
37+
Is a string [expression](../../t-sql/language-elements/expressions-transact-sql.md) containing characters that should be replaced. *characters* can be any character data type.
3838

39-
translations
40-
Is a character [expression](../../t-sql/language-elements/expressions-transact-sql.md) that matches second argument by type and length.
39+
*translations*
40+
Is a string [expression](../../t-sql/language-elements/expressions-transact-sql.md) containing the replacment characters. *translations* must be the same data type and length as *characters*.
4141

4242
## Return Types
43-
Returns a character expression of the same type as `inputString` where characters from the second argument are replaced with the matching characters from third argument.
43+
Returns a character expression of the same data type as `inputString` where characters from the second argument are replaced with the matching characters from third argument.
4444

4545
## Remarks
4646

47-
`TRANSLATE` function will return an error if characters and translations have different lengths. `TRANSLATE` function should return unchanged input if null vales are provided as characters or replacement arguments. The behavior of the `TRANSLATE` function should be identical to the [REPLACE](../../t-sql/functions/replace-transact-sql.md) function.
47+
`TRANSLATE` will return an error if *characters* and *translations* expressions have different lengths. `TRANSLATE` will return NULL if any of the arguements are NULL.
4848

49-
The behavior of the `TRANSLATE` function is equivalent to using multiple `REPLACE` functions.
49+
The behavior of the `TRANSLATE` function is equivalent to using multiple [REPLACE](../../t-sql/functions/replace-transact-sql.md) functions.
5050

5151
`TRANSLATE` is always SC collation aware.
5252

0 commit comments

Comments
 (0)