SQL

Operand type clash: int is incompatible with uniqueidentifier (Source: MSSQLServer, Error number: 206)+

Don’t believe the MSDN advice: recreate your subscription. It’s unecessary when a little script will rectify the issue brought in...

Read More+ 3 years ago
,

Find and fix the root issue in a MSSQL replication error+

Several errors can be generated during replication such as ‘Cannot resolve the collation conflict between “SQL_Latin1_General_CP1_CI_AS” and “Latin1_General_CI_AS” in the...

Read More+ 3 years ago

Major SQL efficiency tip – drag and drop table column list in SSMS+

Most MSSQL DBAs know the object explorer in Microsoft SQL Management Studio has a heap of tricks that go mostly...

Read More+ 5 years ago

Measuring query speed versus cost in T-SQL+

Every DBA spends considerable time constructing queries and managing their server but do as many spend time optimising their individual...

Read More+ 5 years ago

Database diagram support objects cannot be installed because this database does not have a valid owner.+

The first ticket of the day sent me to Microsoft SQL Server Management Studio to fix the sudden lack of...

Read More+ 5 years ago
,

SQL pivots – a pivot here, a pivot there, a pivot everywhere+

Excel aficionados commonly pivot data to help demonstrate their statistical objective, but in T-SQL the same tool goes largely unused....

Read More+ 5 years ago
,

SQL Server collations+

Collations are used by SQL Server to manage the usage of the characters from a language, such as English or...

Read More+ 5 years ago

Animal farm then 1984? – partitioned row numbers in T-SQL+

When returning a dataset, it is common to attach an ordinal or row number to each and every row, providing...

Read More+ 5 years ago
,

Who succeeded George IV? – recursion in T-SQL+

Following on from my previous SQL post on Common Table Expressions in Microsoft SQL Server, this post demonstrates recursion through hierachial...

Read More+ 5 years ago
,

Segmenting strings in SQL – a T-SQL CTE example+

Common Table Expressions (CTE) like so many of SQL Servers tools is only maximised by a small proportion of all...

Read More+ 5 years ago

The under used nullif+

While the usage of the SQL function ‘isnull’ is ubiquitous, ‘nullif’ is the polar opposite. As with so many useful...

Read More+ 5 years ago

Replication in SQL server – identity range management+

Identity columns are commonly used across numerous database applications, providing the database owner a low overhead, logical approach to stamp...

Read More+ 5 years ago

xQuery+

I love a good xQuery. Today’s task has been to produce an xQuery that could return various information from an...

Read More+ 6 years ago

SQL replication+

SQL replication is continuing to tick along very nicely after it’s introduction a few months back. I have a secondary...

Read More+ 6 years ago