SQL Server Error 206: Operand type clash

SQL Server error Msg 206, Level 16 is a common error to get when inserting data into a table.

It happens when you’re trying to insert data into a column that is incompatible with the data type you’re trying to insert.

This could happen if you accidentally try to insert data into the wrong column (or even the wrong table). But it could also happen if you incorrectly assume that SQL Server will convert the data for you.

To fix this issue, make sure you’re inserting the correct data type.

Continue reading

How to Map Multiple Partitions to a Single Filegroup in SQL Server (T-SQL)

If you’re familiar with creating partitioned tables in SQL Server, you might be used to creating a separate filegroup for each partition. This has its benefits, and may very well be the method you would choose in most scenarios.

However, you also have the option of mapping multiple partitions to a single filegroup.

In this article I share two examples of mapping multiple partitions to a single filegroup.

  • Example 1 maps all partitions to a single filegroup.
  • Example 2 maps some partitions to one filegroup, and some to another.
Continue reading