The Bit Bucket

SSMS Tips and Tricks 2-1: Environment fonts

I’ve been very lucky over the years because I haven’t needed to wear glasses. Every now and then I purchase a pair because I thought it might help with reading. Once I get them though, I find them more inconvenient than helpful and stop using them. I’ve am long-sighted in one eye and short-sighted in the other. That’s turned out to be a really useful thing in day to day life.

2025-06-02

SQL Interview: 52 Deleting duplicated rows

This is a post in the SQL Interview series. These aren’t trick or gotcha questions, they’re just questions designed to scope out a candidate’s knowledge around SQL Server and Azure SQL Database.

Section: Administrator Level: Medium

Question:

You have an ETL process that loads employee details into a table named Staging.Employees. The table has the following columns:

  • EmployeeID (int)
  • FullName (nvarchar(100))
  • LoginName (varchar(100))

The table is a heap and has no primary key.

2025-06-01

SSMS Tips and Tricks 1-12: Custom report creation

The built-in reports in SQL Server Management Studio are great but you can add your own as well. SQL Server 2005 and later have an option for Custom Reports. Let’s create a report that shows the use of deprecated data types. We’ll use a stored procedure from our free SDU Tools to do that. In SQL Server Data Tools, create a new Report Server project.

Give the project an appropriate name and location, then click Create.

2025-05-31

SQL: What is Halloween protection?

If you’ve worked with SQL Server (or with databases in general) for any length of time, you will have heard someone refer to Halloween protection.  It refers to a problem where update operations could inadvertently end up modifying a row more than once.

Why halloween?

The name Halloween protection comes from when the problem occurred during research on the System R project at the IBM Almaden Research Center back in 1976.

2025-05-30

General: Machine Learning Summit from PackT

Our friends at Packt are running a virtual Machine Learning Summit July 16–18.

Content looks good so far, with some great people speaking, and promising a bunch of real-world case studies. Probably the greatest value in these summits are the conversations across ML, AI, and data engineering, that are discussing future directions. It’s all virtual, and in an accessible format.

So if you are into machine learning, this could be for you.

2025-05-29

SSMS Tips and Tricks 1-11: Built-in standard reports

SQL Server Management Studio provides a large amount of information about databases by letting the user navigate around Object Explorer and view the properties of objects.

What I’m often surprized by though, is the number of users who haven’t ever explored the reports that are available. In another section, we’ll look at creating custom reports, but there is a wonderful set of built-in standard reports that you should explore. For example, if I right-click the WideWorldImporters database, I can see these reports:

2025-05-29

SQL Interview: 51 Truncating datetime values to the minute

This is a post in the SQL Interview series. These aren’t trick or gotcha questions, they’re just questions designed to scope out a candidate’s knowledge around SQL Server and Azure SQL Database.

Section: Developer Level: Medium

Question:

You are creating a view in a SQL Server based data warehouse.

You need to query transactions that include a TransactionDateTime column which uses the DateTime data type. The query is as follows:

2025-05-28

SSMS Tips and Tricks 1-10: Dependency Tracking

In early versions of SQL Server, the only way to try to track dependencies between tables, procedures, functions, etc. was to use the sp_depends stored procedure.

And everyone thought it lied.

The real problem was that it didn’t understand partial dependencies and deferred resolution of objects. For example, it got confused if you created a procedure that mentioned a table, then later created the table.

SQL Server 2012 introduced far superior dependency views, and SQL Server Management Studio (SSMS) shows dependencies using those views under the covers.

2025-05-27

Book Review: A Concise Summary of Cardiology

I decided I’d like to have a greater understanding of some medical topics. One of the areas I’ve been looking into is Cardiology.

I was looking around to find some books that explain it and I stumbled upon A Concise Summary of Cardiology by Kevin Carson .

For a tough topic, I was surprised that the book was so short.

The problem that I found with the book is that it’s not really for me. Instead of explaining the concepts, it’s really a how to guide for people who are studying for work in cardiology.

2025-05-26

SSMS Tips and Tricks 1-9: Turn off option to prevent saving changes that require table recreation

I don’t use the table designer in SQL Server Management Studio. Sorry, but I just don’t like it, or the options that it chooses for me. I’d rather use T-SQL every time, but I’m also the first to admit that there are plenty of people who would use that designer.

And when they do, many run into an error that says:

Saving changes is not permitted. The changes that you have made require the following tables to be dropped and re-created. You have either made changes to a table that can’t be re-created or enabled the option Prevent saving changes that require the table to be re-created.

2025-05-25