Format TSQL onto one line

Viewed 19141

Our company uses an old app which reads TSQL from a .INI file. Due to how the app process the INI file the TSQL has to be all on one line. I use Poor Mans TSQL Formatter to get everything nice and tidy for things like SPs, but am wondering if there's something out there to do the reverse - take nicely formatted TSQL and shove it all onto one line (removing carriage returns , line breaks etc). I'm working in SSMS but also use Notepad++, and will happily use some other editor if it has the functionality.

5 Answers

Using Notepad++ (Without any plugin)

After lot's of googling I found that there are no plugins like TextFX and PoorMansTSqlFormatter are available in x64 bit version of notepad++ even not needed.

Notepad++ --> Write Query --> Edit --> Blank Options --> Remove Unnecessary Blank and EOL.

enter image description here

That's it.

Related