Just found the following interesting, although its only semi useful because the formatting is lost when saved.
Run something similar to the following in grid mode:
you will then get the usual results window,
which u can click on and see the formatted xml.
e.g
<syscolumns>
<name>base_schema_ver</name>
</syscolumns>
However it has a region code block so u can collasp the code to
<syscolumns>[...]
Ok so far so good. However you can copy and paste this xml to your query window
and it retains the region code block
...and i can delete out all the extra code to leave me with just the code block...i can then use this to hide large bits of sql
--code block
select 0 --ok i was lying when i said large
--code block end
select 1
Run something similar to the following in grid mode:
Code:
select top 1 name from syscolumns for xml auto, elements
you will then get the usual results window,
which u can click on and see the formatted xml.
e.g
<syscolumns>
<name>base_schema_ver</name>
</syscolumns>
However it has a region code block so u can collasp the code to
<syscolumns>[...]
Ok so far so good. However you can copy and paste this xml to your query window
and it retains the region code block
...and i can delete out all the extra code to leave me with just the code block...i can then use this to hide large bits of sql
--code block
select 0 --ok i was lying when i said large
--code block end
select 1