Note: Forums will be making significant UX changes to address key usability improvements surrounding search, discoverability and navigation. To learn more about these changes please visit the announcement which can be found HERE.
T-SQL Code formatting - remove tabs and spaces when returned from Query Builder

Locked T-SQL Code formatting - remove tabs and spaces when returned from Query Builder

  • Friday, April 27, 2012 11:21 AM
     
     

    Hello

    Does anyone know how to stop the Query Builder from generating code such as:

     SELECT        *
     FROM            tblWhatever
     WHERE        (1 = 2)

    All I want returned is:

     SELECT * FROM tblWhatever WHERE 1=2

    Visual Studio 6 used to do this no problem.  If I want my statements broken up by SELECT/FROM/WHERE it's a damn sight easier to do it from a single line of code, than it is to do the reverse - remove all the spaces/tabs if I want my query on one line.

    I've tried playing around with the settings under Tools - Options - Text Editor - T-SQL and T-SQL90 but they make no difference however they're set.

    Can anyone advise?

    Thanks

    David

All Replies

  • Monday, April 30, 2012 7:18 AM
    Moderator
     
     Answered

    Hi Bagload,

    Based on my knowledge the Visual Studio cannot perform the T-SQL code format.

    You can submit your suggestions to Microsoft Connect feedback portal http://connect.microsoft.com, Microsoft engineers will evaluate them seriously, thanks.


    Lucy Liu [MSFT]
    MSDN Community Support | Feedback to us