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

Commit f995169

Browse files
authored
Update formatmessage-transact-sql.md
The FORMATMESSAGE function will take a variable for its first parameter.
1 parent ac9feb0 commit f995169

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ ms.author: maghan
3333
## Syntax
3434

3535
```syntaxsql
36-
FORMATMESSAGE ( { msg_number | ' msg_string ' } , [ param_value [ ,...n ] ] )
36+
FORMATMESSAGE ( { msg_number | ' msg_string ' | @msg_variable} , [ param_value [ ,...n ] ] )
3737
```
3838

3939
[!INCLUDE[sql-server-tsql-previous-offline-documentation](../../includes/sql-server-tsql-previous-offline-documentation.md)]
@@ -46,6 +46,11 @@ FORMATMESSAGE ( { msg_number | ' msg_string ' } , [ param_value [ ,...n ] ] )
4646
**Applies to**: [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] ( [!INCLUDE[ssSQL15](../../includes/sssql15-md.md)] through [current version](https://go.microsoft.com/fwlink/p/?LinkId=299658)).
4747

4848
Is a string enclosed in single quotes and containing parameter value placeholders. The error message can have a maximum of 2,047 characters. If the message contains 2,048 or more characters, only the first 2,044 are displayed and an ellipsis is added to indicate that the message has been truncated. Note that substitution parameters consume more characters than the output shows because of internal storage behavior. For information about the structure of a message string and the use of parameters in the string, see the description of the *msg_str* argument in [RAISERROR (Transact-SQL)](../../t-sql/language-elements/raiserror-transact-sql.md).
49+
50+
*@msg_variable*
51+
**Applies to**: [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] ( [!INCLUDE[ssSQL15](../../includes/sssql15-md.md)] through [current version](https://go.microsoft.com/fwlink/p/?LinkId=299658)).
52+
53+
Is an nvarchar or varchar variable that contains a string complying with the criteria for *msg_string* above.
4954

5055
*param_value*
5156
Is a parameter value for use in the message. Can be more than one parameter value. The values must be specified in the order in which the placeholder variables appear in the message. The maximum number of values is 20.

0 commit comments

Comments
 (0)