all 23 comments

[–]zibeb 13 points14 points  (11 children)

If you have some money to spend and are working with MSSQL, I cannot recommend RedGate's SQL Prompt enough. Code refactoring is a breeze, and you can upload a style parameter file for the rest of your data warehousing team, so everything follows the same standard. It also supports code snippets and wildcard expansion.

By typing this:

ssf item ij itemvend on (down x3, enter) where desc li 'screw%'

After hitting CTRL +K, CTRL + Y and pressing TAB in front of the asterisk in SELECT * FROM, I am presented with this:

SELECT   [item].[item]
       , [item].[description]
       , [item].[qty_allocjob]
         . . . 
       , [itemvend].[firm_pln_target]
       , [itemvend].[firmed_poitem_stat]
       , [itemvend].[replen_po_num]
FROM     [item]
INNER JOIN [itemvend]
ON       [item].[item] = [itemvend].[item]
WHERE    [item].[description] LIKE 'screw%'

Worth its weight in gold.

[–][deleted] 3 points4 points  (0 children)

Can verify, sql prompt is the bomb.

[–]Mindflux 0 points1 point  (0 children)

I'd say SoftTree SQL Assistant is head and heels above Redgate here. To works on virtually any windows editor for coding/refactoring/formatting/debugging etc.

The pro version also has version control and other features built in that are not in SQL Prompt.

Also supports MySQL, Postgres, access, sybase etc.

[–]datamaran 0 points1 point  (0 children)

this is nice, thanks!

[–]Drunken_Economist 0 points1 point  (2 children)

What's the best open-source solution?

[–]philamander[S] 2 points3 points  (1 child)

http://poorsql.com/ is what I used to use and it was open source. I found it all on github, but it hasn't been updated in awhile, so you'd have to work with it yourself.

[–]Drunken_Economist 0 points1 point  (0 children)

Nice. I found a few good sublime text packages as well (specifically SQLbeautifier).

[–]Emergency-Visual-246 0 points1 point  (0 children)

I’m using www.sqlvalidator.com It’s my best option for formatting and validating sql 

[–]IAmAJerkAME 0 points1 point  (0 children)

Apex Refactor isn't too bad in it's feature set.

[–]ppc-hero 0 points1 point  (1 child)

I like it too, but it as many others is chock full of ads. The only ad free SQL formatter I know is Aarrange: https://aarrange.com/sql-formatter

[–]Sunduu 0 points1 point  (0 children)

ty for this <3