ttist25
asked on
T-SQL "Code Wrapping" in SSMS 2012
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!
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you Pawan!
That isn't exactly what I had envisioned but it definitely gets the job done.
Thanks!
That isn't exactly what I had envisioned but it definitely gets the job done.
Thanks!
#Region
....
#EndRegion
we have this in .NET
If we long code SQL automatically shows - ( hyphen )
click on that SQL collapse the long code.