SQL tidy tools

  • In various programming languages you can find websites, or download applications, which will go through your code and tidy it up. Make it look better, easier to read, etc. I'd like the same thing for SQL. I've done a web search on SQL tidy and have found some results which look promising, but thought I'd ask here for recommendations as to what you use to tidy up SQL code.

    Kindest Regards, Rod Connect with me on LinkedIn.

  • I recently purchased the desktop version of SQL Pretty Printer, which I quite like (http://www.dpriver.com/pp/sqlformat.htm).

    The main reason for buying that one was because it can work in batch mode and reformat an entire folder of SQL code. Several versions are available - Desktop, SSMS add-in and Visual Studio add-in.

    You can use it for free I believe, but the batch option isn't available.

  • I purchased the SSMS Addin from The same company BrainDonor mentioned;

    $50 bucks, and I went for the add-In vs the batch processing executable, as my coding is more SSMS oriented.

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • Poor Man's T-SQL Formatter is free and works quite well.

    Comes in many flavors:

    * SSMS Addin

    * Notepad++ plugin

    * Command-line utility

    * Standalone app

    * WinMerge plugin

    * Web @ http://poorsql.com

    It's a must-have.

    -- Gianluca Sartori

  • http://www.apexsql.com

    have a free refactor add in for SSMS......you will need to download all the tools (130Mb)

    but just install the refactor

    has many options

    ps...I have no involvement with Apexsql.

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • There's always the T-SQL Prettifier over at Simple-Talk.

    If you're willing to spend some money though, I strongly recommend Red Gate SQL Prompt[/url]. I can't live without it. It not only does code layout, but you also get type-ahead code completion, snippit storage and command prompts. It's really an amazing little piece of software.

    ps: I work for Red Gate.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • That is really cool, Grant, thank you!

    I'm afraid that unless it is free, my management won't consider it, so SQL Prompt is out, as is anything else that costs.

    Kindest Regards, Rod Connect with me on LinkedIn.

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply