Like the RAISERROR statement, FORMATMESSAGE edits the message by substituting the supplied parameter values for placeholder variables in the message. For more information about the placeholders allowed in error messages and the editing process, see RAISERROR (Transact-SQL).
Note: |
|---|
|
FORMATMESSAGE works only with messages created using sp_addmessage.
|
FORMATMESSAGE looks up the message in the current language of the user. If there is no localized version of the message, the U.S. English version is used.
For localized messages, the supplied parameter values must correspond to the parameter placeholders in the U.S. English version. That is, parameter 1 in the localized version must correspond to parameter 1 in the U.S. English version, parameter 2 must correspond to parameter 2, and so on.