A Little Happiness in SSMS
Published: 4th August 2014
This is basically an introduction into something I want to play with in some upcoming posts, but to start with I thought I would introduce the topic with a little bit of happiness.

Simply it’s the lesser known ability (it’s VERY rare to find anyone who knows about this) of SSMS to natively produce shapes and graphs based on data you provide it.

Now I admit from the outset that this isn’t exactly advanced graphical displays we’re talking about here… in fact it’s pretty dire… however, if you’re not looking for presentation and want to simply see something quickly and at a glance without going into Excel or some other program, then it does the job.

Anyway… a little happiness to start things off...

All you need to do for this is to run the following code in SSMS:

select geometry::STGeomFromText
(
'multipolygon
(
((0 0,0 9,9 9,9 0,0 0)),
((1 1,1 8,8 8,8 1,1 1)),
((3 6,3 7,4 7,4 6,3 6)),
((5 6,5 7,6 7,6 6,5 6)),
((4 4,4 5,5 5,5 4,4 4)),
((2 3,2 4,3 4,3 3,2 3)),
((6 3,6 4,7 4,7 3,6 3)),
((3 2,3 3,6 3,6 2,3 2))
)'
, 0
)


And instead of just the “Results” and “Messages” tabs you should also see “Spatial Results”. Click that and you’ll get a smile:

Good eh?

This was just a quick demo really, I’ll explain about this some more in some upcoming posts.
Comments:
NB: Comments will only appear once they have been moderated.