Thanks go to Tony Rogerson and Justin Langford for a great evening at Reading last night. It was the first time I had been to the Microsoft Campus so was a bit in awe of everything. Justin and Tony both gave great sessions, but the tip I am going to talk about was almost a throwaway comment by Tony. During his session on partitioned tables he suddenly perrformed some kind of sourcery that split the scripting window in SSMS into two editable windows. I knew this could be done in Excel but must admit I had never seen the bar that allows you to do this in SSMS.
If you’re not entirely sure what I’m talking about then hopefully the next two screen shots will be able to help make things clearer.

I have circled the bar that allows you to create the split window by simply pulling it down . In the next screenshot you will see how this can be used.
In this screenshot I ran a simple query to return all table names in the form of a select statement per table and pasted the results into the query window to fill it up nicely.

It is worth noting that both windows are completely editable and if you type in one window it will replicate in real time in the second window as it is just a virtual split on the same object. This morning I noticed that the same bar is also available inside the scripting editor in Visual studio should you use that editor instead of SSMS.
Everyone I have spoken to about this at work today either said “wow” or “cool”. I guess it’s a case of small things please small minds.

If I could give a grade to your blog, I’d give it an A , maybe even an A ! Keep up the good writing.