Worth Corner, Crawley, RH10 7SL

Support Hours - Mon-Sat, 8.00-18.00

Welcome to our SQL Server blog

This blog was created in order to pass on some of our knowledge and advice in the hope that the community might find it useful.

Obviously Microsoft SQL Server is our area of expertise and therefore this is our most thorough blog with everything from the basic through to the the incredibly advanced and, as such, we should have something for everyone within our pages.


A Little Happiness in SSMS
Published: Mar 04, 2016
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.
Leave a Comment
Your email address will not be published. All fields are mandatory.
NB: Comments will only appear once they have been moderated.

SQL  World  CEO
Kevin  Urquhart

iPhone Selfie

I am a SQL Server DBA, Architect, Developer, Trainer, and CEO of SQL World. This is my blog in which I’m simply trying to share my SQL knowledge and experiences with the world.

Categories


© Copyright 2020 SQLTraining Ltd.