17

Poor Man’s T-SQL Formatter Addin: Useful for devs!

 3 years ago
source link: https://stevedrivendevelopment.com/2013/09/24/poor-mans-t-sql-formatter-addin-useful-for-devs/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Poor Man’s T-SQL Formatter Addin: Useful for devs!

A bit of love for the Poor Man’s T-SQL Formatter addin to MSSQL Management Studio. Allows you to reformat any query window in Management Studio to apply a consistent format. Really nice ‘starter for ten’, letting you clean up a batch of SQL after a hacking session. Why not look just that little bit more professional, for free?

insert into dbo.ItemBase ([Id],[Name] ,[Modified] ,[Created] ,[EntityStatus]) 
select [Id] ,[Name] ,[Modified] ,[Created] ,[EntityStatus]
from dbo.MyTable

to this;

INSERT INTO dbo.ItemBase (
[Id]
,[Name]
,[Modified]
,[Created]
,[EntityStatus]
)
SELECT [Id]
,[Name]
,[Modified]
,[Created]
,[EntityStatus]
FROM dbo.MyTable

NB: I’ve not tried the Visual Studio addin, just the MSSQL one. I just thought I’d keep things a bit cleaner. It might work brilliantly, but I’ve not tried it.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK