Here’s the scenario: you copy and paste some code into a query you are building. A few minutes later you need that same snippet again, but you’ve already copied and pasted something else onto the clipboard.
The next five minutes of your life are spent searching across the twenty query editor tabs you have open looking for that original piece of code.
However, SQL Server Management Studio goes above and beyond the regular copy and paste feature set — it has a clipboard ring.
What’s a clipboard ring you ask?
The clipboard ring let’s you cycle through the last 20 things you copied onto your clipboard when you go to paste in SSMS. It can be accessed in the Edit menu (like in the screenshot above) or by using the keyboard shortcut CTRL + SHIFT + V.
Let’s say you have the following queries:
SELECT FruitId FROM dbo.Fruits WHERE Name='Apple'
SELECT FruitId FROM dbo.Fruits WHERE Name='Banana'
SELECT FruitId FROM dbo.Fruits WHERE Name='Orange'
And let’s pretend you want to copy all of the fruit names into the IN statement of this query:
SELECT FruitId FROM dbo.Fruit WHERE Name IN()
Instead of copying and pasting each fruit separately, you can batch your copies together and then paste them from the clipboard ring into your IN statement at the same time:
Use this trick the next time you need to find that snippet of code you used right before heading off to lunch and I guarantee you will be saving yourself tons of time.
It is easy to get caught up in the daily details of life and not take the time to reflect on longer term goals and accomplishments.
Inspired by Brent Ozar and Steve Kamb, these Epic Life Quests are intended to help me reflect on my accomplishments and help me stay focused on the things that are important.
Each level contains five achievements and once all are completed I can “level up” to the next five. Follow along and let me know if you create any epic life quests of your own.
Level 2 (currently working on)
Blog weekly for 6 months straight — Last year I began blogging more than any previous year, but I didn’t always stick to a schedule. My biggest problem was I didn’t know what I wanted to write about so choosing topics was difficult and frustrating. After looking back at what posts were the most well-received, I’ve decided to focus the first half of 2017 to mostly technical and professional development type topics.
Vacation in Hawaii — Our vacations in 2016 focused on places we could reach by car so that we could save some money for a larger trip. This will be the bigger trip. After visiting Hawaii, I will have visited 36 states + Washington D.C (airports don’t count!).
Work on mental mindfulness— practice meditation to improve focus, patience, manage stress, be happier. I want to average at least 5 days/week for 3 months to reach this goal.
Always be reading at least one book — Although I read 40+ books in 2016, there were stretches of weeks at a time where I was not reading anything. For 6 months I don’t want to go more than 3 days without having picked a book to have available to read.
Level 1 Quests (completed before 2017)
Here are some of my achievements before I started this page on January 1, 2017.
Set up an environment for programming regularly at home — completed 2016