Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Troubleshooting
Research
Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

T-SQL "Code Wrapping" in SSMS 2012

Avatar of ttist25
ttist25 asked on
Microsoft SQL Server
3 Comments1 Solution110 ViewsLast Modified:
Hey there -

I'm writing a lot of one off scripts in SSMS during analysis of new datasets.  I'm trying to figure out a way to code wrap regions in SSMS.  I haven't found anything in searches other than plugin/addon stuff which I'd like to avoid.  

Does anyone have any tricks that would allow me to create a collapsable "region" anywhere in my code in SSMS.  

Something like:

SELECT
#RegionFields
this,
that,
the,
other
#/EndRegionFields
FROM
MyTable
WHERE
#RegionCriteria
this=that and
deez=doze and
so=on and
so=on
#EndRegionCriteria

So that anything between the #Regions would be collapsable.  

TIA!