Querying SQL Server with something LIKE a regular expression

Querying SQL Server with something LIKE a regular expression

Most of us are familiar with the LIKE command in SQL Server (and other DBMS environments), but few venture beyond simple text matching and the ‘%’ wildcard. It’s ability to use some regular expression (a.k.a. regex or regexp) syntax is a surprise to many. For this article, I’m assuming that readers have already used the…

Read More Read More

Object Catalog Views: Table Metadata

Object Catalog Views: Table Metadata

It’s handy to programmatically get metadata on tables (column names and datatypes), either to review implementation, or as part of a process automating code creation.

Partitions in SQL Server: A collection Of Thoughts

Partitions in SQL Server: A collection Of Thoughts

Like when I started writing about Dates in SQL Server, a couple of notes on partitioning has turned into a series… And not one I’m so happy with (I had a lot to cover and at the same time a lack of a bigger picture direction). Rather than ramble on about aspects of partitioning in…

Read More Read More

Partitions in SQL Server: Partition an Existing Fact Table (by date)

Partitions in SQL Server: Partition an Existing Fact Table (by date)

Picking up on my series on partitioning, previously I looked at Partitions in SQL Server: Creating a Partitioned Fact Table (by date) now I’m going to look into splitting an existing table into partitions. A key thing to remember is that the moving of data on disk can be time consuming and cause locks. The approaches…

Read More Read More

Wait For Data to be ready

Wait For Data to be ready

Here are two SQL Server based methods for waiting for data, and raising an alert if it’s not ready. I’ve designed them as simple templates which I can easily re-use and customise.

NULL: When a value is neither IN or NOT IN a list.

NULL: When a value is neither IN or NOT IN a list.

NULL is always a challenge for equality, I’ve written about it before. I recently produced some samples for training/explanation of NULL when it comes to IN and NOT IN, and thought I’d include it here.