Does anyone know how to do this?
Thanks,
John
SQL Server 2005 Management Studio does not have a feature to
automatically indent statements according to their significance, like
Visual Studio. One feature that might help is to select a portion of
code and increase/decrease indent with Tab / Shift+Tab. The Query
Designer tries to format the code (only one DML statement), but the
result looks very bad to me.
Razvan
Thanks for the tip. When I mention code outlining I am referring to
the ability VS has to collapse/expand blocks of sql code. So in VS if
you highlight lines of sql that has been opened from server explorer
and type Ctrl-M, Ctrl-H, it will make that selection a "block" and put
a control that enables you to hide/show that block.
I can't find the same thing in SSMS although there appears to be
support for it as you can copy paste sql code that has "hidable"
blocks from VS to SSMS and the blocks are preserved.
Oh... I see. Sorry I didn't understand it the first time.
> I can't find the same thing in SSMS although there appears to be
> support for it as you can copy paste sql code that has "hidable"
> blocks from VS to SSMS and the blocks are preserved.
Indeed, I see that the blocks are preserved (they can be expanded/
collapsed), but there is no option for creating new blocks, toogle all
outlining, stop outlining, etc).
Maybe you should request this feature on https://connect.microsoft.com/SQLServer/Feedback
Razvan
>> On Thursday, September 13, 2007 3:43 AM Razvan Socol wrote:
>> Hello, jeljeljel
>>
>> SQL Server 2005 Management Studio does not have a feature to
>> automatically indent statements according to their significance, like
>> Visual Studio. One feature that might help is to select a portion of
>> code and increase/decrease indent with Tab / Shift+Tab. The Query
>> Designer tries to format the code (only one DML statement), but the
>> result looks very bad to me.
>>
>> Razvan
>>> On Thursday, September 13, 2007 9:46 AM jeljeljel wrote:
>>> On Sep 13, 2:43 am, Razvan Socol <rso...@gmail.com> wrote:
>>>
>>> Thanks for the tip. When I mention code outlining I am referring to
>>> the ability VS has to collapse/expand blocks of sql code. So in VS if
>>> you highlight lines of sql that has been opened from server explorer
>>> and type Ctrl-M, Ctrl-H, it will make that selection a "block" and put
>>> a control that enables you to hide/show that block.
>>>
>>> I can't find the same thing in SSMS although there appears to be
>>> support for it as you can copy paste sql code that has "hidable"
>>> blocks from VS to SSMS and the blocks are preserved.
>>>> On Thursday, September 13, 2007 11:15 AM Razvan Socol wrote:
>>>> On Sep 13, 4:46 pm, jeljeljel <livermore.j...@gmail.com> wrote:
>>>>
>>>> Oh... I see. Sorry I didn't understand it the first time.
>>>>
>>>>