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

270 reads

Blogs

Building AgentDBA’s Slack Escalation

By

Until now, a CRITICAL finding did the right internal routing, but the last mile...

Changing the Owner Removes Permissions: #SQLNewBlogger

By

This is actually inspired by an article SQL Server Central, which taught me something...

T-SQL Tuesday #200 - I Bet It's Bad if I See...

By

T-SQL Tuesday is a monthly blog party hosted by a different community member each...

Read the latest Blogs

Forums

ALAMAT BCA KCU PONTIANAK TLP/WA 08218200174

By m4rt1n4

Telp Cs:(0821)8200174 Jl. Jenderal Ahmad Yani No.1, Benua Melayu Darat, Kec. Pontianak Sel., Kota...

ALAMAT BCA KCU TANJUNG PANDAN TLP/WA 08218200174

By R4nt4u

Telp Cs: (0821)8200174 Jl. Jend. Sudirman No.17, RT.008/RW.04, Pangkal Lalang, Kec. Tj. Pandan, Kabupaten...

How Clustering can be Used as a Preprocessing Technique for Classification in Azure Machine Learning

By Dinesh Asanka

Comments posted to this topic are about the item How Clustering can be Used...

Visit the forum

Question of the Day

Moving the Error Log

How can I change the location in which the SQL Server error log is written in SQL Server 2025?

See possible answers