TaoK / PoorMansTSqlFormatter

A small free .Net and JS library (with demo UI, command-line bulk formatter, SSMS/VS add-in, notepad++ plugin, winmerge plugin, and demo webpage) for reformatting and coloring T-SQL code to the user's preferences.
http://www.architectshack.com/PoorMansTSqlFormatter.ashx
GNU Affero General Public License v3.0
947 stars 266 forks source link

Formatting uppercases the word 'definition' in select #272

Open Tarjei-stavanger opened 2 years ago

Tarjei-stavanger commented 2 years ago

This is code from www.sqlservertutorial.net/sql-server-views/sql-server-get-view-information/ It allows us to view the code in a view.

SELECT definition, uses_ansi_nulls, uses_quoted_identifier, is_schema_bound FROM sys.sql_modules WHERE object_id = object_id( 'sales.daily_sales' );

The Character between the 'select' and 'definition' in the output might not survive copy and paste. It appears to not do that when I pasted the result into OneNote.

yogeshSawant0931 commented 1 year ago

You can use square bracket.

SELECT [definition] ,uses_ansi_nulls ,uses_quoted_identifier ,is_schema_bound FROM sys.sql_modules WHERE object_id = object_id('sales.daily_sales');