You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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).
35
35
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.
38
38
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*.
41
41
42
42
## 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.
44
44
45
45
## Remarks
46
46
47
-
`TRANSLATE`function will return an error if characters and translationshave 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.
48
48
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.
0 commit comments