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
964 stars 267 forks source link

For temporary table names, i.e. #tableName, the # and the tableName are separated with a space #216

Closed erapade closed 5 years ago

erapade commented 5 years ago

As the heading says. temporary table names are not handled correctly:

For CREATE TABLE #calendardst ([year] INT PRIMARY KEY)

The formatted code looks like below CREATE TABLE # calendardst ( [year] INT PRIMARY KEY );

Please note the space between # and the tableName. This also happens on all references to the table name

TaoK commented 5 years ago

I can't reproduce this eg on poorsql.com:

https://poorsql.com/?inputString=CREATE+TABLE+%23calendardst+(%5Byear%5D+INT+PRIMARY+KEY)

Do you have a more specific reproduction case? Is the issue presenting in a particular tool?

erapade commented 5 years ago

I tried to reproduce in Azure Data Studio (the tool i think I used before), but I can't reproduce the fault either, so I close this ticket.