troubleshooting Question

T-SQL "Code Wrapping" in SSMS 2012

Avatar of ttist25
ttist25 asked on
Microsoft SQL Server
3 Comments1 Solution111 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!
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 3 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros