Scripts

Technical Article

T-SQL Table Valued Function to compare Semantic Versions

Semantic versioning (SemVer) is a standardized system for labeling software releases using a three-part number—major, minor, and patch—optionally followed by pre-release labels and build metadata. Comparing semantic versions is complex because it requires handling both numeric and string components, as well as special precedence rules for pre-releases and stable versions. SQL Server’s hierarchyid data type is ideally suited for comparing the numeric parts of semantic versions, enabling efficient and accurate ordering without the pitfalls of string comparison or manual parsing.

5 (1)

You rated this post out of 5. Change rating

2025-05-27

96 reads

Blogs

Copying an Azure SQL database between two Azure SQL Instances in two different subscriptions.

By

I recently had to copy an Azure SQL database (SQL db) from one subscription...

A field note: AI Ambition vs. Operational Reality in 2025

By

Ivan Jelić, Group CEO at Joyful Craftsmen, reflects on what separates AI success from...

Redefining Tech Leadership in the Age of Microsoft AI

By

AI is no longer a niche capability – it is a leadership catalyst. As...

Read the latest Blogs

Forums

How a Legacy Logic Choked SQL Server in a 30-Year-Old Factory

By Chandan Shukla

Comments posted to this topic are about the item How a Legacy Logic Choked...

SQL Server Columnstore Index Fragmentation

By Grant Fritchey

Comments posted to this topic are about the item SQL Server Columnstore Index Fragmentation

do i lose "what this object depends on" etc when moving sprocs to etl server

By stan

Hi i was surprised to see the approach my coworkers used to sunset talend...

Visit the forum

Question of the Day

SQL Server Columnstore Index Fragmentation

The columnstore index is absolutely different than the traditional rowstore b-tree index. Because of this, it doesn't suffer from the same kind of fragmentation across pages as the b-tree index. Yet, it does suffer from a type of fragmentation brought about by an excess of deleted rows in a rowgroup and a lack of compression of storage because more things are in the delta store. While b-tree indexes use dm_db_index_physical_stats to show fragmentation, which system tables or DMVs can be used in SQL Server (prior to SQL Server 2025) to determine columnstore fragmentation?

See possible answers