Category: "Tips&Tricks"

Filtered Index with WHERE col IN (...) clause

I was asked if it is possible to create an filtered index with a WHERE col IN (…) clause and then use WHERE col = n with n being one of the values of the (…) list So let’s create a small sample [codespan]create table idx ( ID int NOT NUL… more »

Just deployed my first SQL Azure database.

Quiet an adventure as with all IT related things: SQL Azure is almost like SQL Server. Emphasis on the almost. But after a little fighting I got it running. Time will tell us how well it is going to run. My tip to all is to have a deployment script that… more »

How to assign a text containing a single quote to a char, varchar, nchar or nvarchar valiable or colum

Sometimes the need to assign a text like "She's the boss" to a text column or variable arises.DECLARE @MyText AS NVARCHAR(100) = 'She's the boss'; You can already see on the syntax coloring that something is wrong. To put a single quote inside a stri… more »