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

255 reads

Blogs

T-SQL Tuesday #198 Roundup: How Do You Detect Data Changes?

By

Thank you to everyone who participated in T-SQL Tuesday #198! When I wrote the...

Optimizing Redshift Performance by Configuring WLM Queues

By

Efficient query performance in Amazon Redshift often comes down to how well you manage...

PowerShell Strikes Back: Return of the Loop

By

Welcome back to PowerShell Strikes Back. We’re three weeks in, and the training is...

Read the latest Blogs

Forums

BCA KCU BANDUNGTelepon 083179431638

By Nha cai Thienhabet

WhatsApp:083179431638Jl. Asia Afrika No.122-124, Paledang, Kec. Lengkong, Kota Bandung, Jawa Barat 40261

BCA KCU PURI INDAH No.Telpon 087781685647

By ricardooliveira

Whatsapp 087781685647 Jl. Puri Indah Raya No.1-3 Blok 02, RT.3/RW.2, Kembangan Sel., Kec. Kembangan,...

BCA KCU SCBD No. telp:087757645171

By midani222

Whatsapp:087757645171 Equity Tower, Ground Floor, Unit D & Lantai 8, Unit E, Jl. Jenderal...

Visit the forum

Question of the Day

QUOTENAME Quote Parameters

When I use QUOTENAME(), I can optionally provide the character used to surround the string in the result. Can I use any character?

See possible answers