Sunday, December 3

Tag: SQL Server

FORMATMESSAGE Statement T-SQL Enhancement in SQL Server 2016
Tech

FORMATMESSAGE Statement T-SQL Enhancement in SQL Server 2016

SQL Server 2016 introduces a new FORMATMESSAGE statement that enhances the existing T-SQL FORMATMESSAGE function. The new statement supports additional options for format string replacement. Such as specifying a date/time culture and using named replacements for replacement parameters. In addition, the new statement can be use to directly return the results of formatting to a variable or column. Without the need to use dynamic SQL. Basic Usage: The basic usage of the FORMATMESSAGE statement is very similar to that of the FORMATMESSAGE function. It takes a format string containing replacement parameters (indicated by % n %), and optional arguments for each replacement parameter. The difference is that, rather than returning the formatted string. FORMATMESSAGE outputs the string to a given...