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.

(1)

You rated this post out of 5. Change rating

2025-05-27

272 reads

Blogs

Day of Data Baton Rouge Slides and Code

By

Thanks to everyone for attending my talk today at Day of data Baton Rouge...

Using Claude Code as a Database SRE Agent with the Everpure Fusion MCP Server

By

Here’s the scenario: one of my SQL Server instances migrated to the DR array....

The Book of Redgate: Products

By

We are product focused at Redgate Software. Here is another of our values that...

Read the latest Blogs

Forums

ALAMAT BANK BCA KCU TARAKAN TLP/WA 08218200203

By m4rt1n4

Hub Cs:08218200203 Jl. Yos Sudarso Pantai No.08, Karang Rejo, Kec. Tarakan Bar., Kota Tarakan,...

Alamat Bank BCA KCU BALIKPAPAN Telp 08218200203

By R4nt4u

Hub.Via,WhatsApp:08218200203 Jl. Jenderal Sudirman No.139, Klandasan Ilir, Kec. Balikpapan Kota, Kota Balikpapan, Kalimantan Timur...

Alamat Bank BCA KCU PALANGKARAYA Telp 08218200203

By layanan_Bca88

Hub.Via,WhatsApp:08218200203 Jl. Jend. A. Yani No.47, Langkai, Kec. Pahandut, Kota Palangka Raya, Kalimantan Tengah...

Visit the forum

Question of the Day

BIT_COUNT() III

In SQL Server 2025, I run this code:

select bit_count(-1)
What is returned?

See possible answers