Scripts

Technical Article

Free T-SQL Script: Database Schema Documentation Generator for Generative AI Services Integration

This script automatically generates comprehensive schema documentation that can be easily consumed by AI services for natural language querying, automated report generation, and intelligent data analysis.

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2025-09-03 (first published: )

1,550 reads

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

377 reads

Blogs

The Book of Redgate: Things We Like, and Things We Less Like

By

This is a great image from the 2012 book. You don’t need to ready...

CPE Catch-Up for Charity (Online Event)

By

Annually, the IIA Palmetto Chapter puts on a 1 day on-line event in conjunction...

AgentDBA & Business Context

By

In the last post I registered AgentDBA as an MCP server in Claude Code....

Read the latest Blogs

Forums

Layanan BCA KCP Sudirman Hub/Wa:0821.820.0233 Jl. Panglima Sudirman No.27

By layanan_Bca88

Telp CS 08218200233 Jl. Panglima Sudirman No.27, Kesatrian, Kec. Blimbing, Kota Malang, Jawa Timur...

Kantor resmi BCA KCP Dinoyo WA/0821.820.0203 Jl. Mayjen Haryono No.16

By m4rt1n4

Telp CS 08218200203 Jl. Mayjen Haryono No.160, Dinoyo, Kec. Lowokwaru, Kota Malang, Jawa Timur...

A Fun Friday

By Steve Jones - SSC Editor

Comments posted to this topic are about the item A Fun Friday

Visit the forum

Question of the Day

Adding Bits III

I have a table, dbo.bittest, where I am testing an application response. This has this structure:

CREATE TABLE [dbo].[BitTest]
(
[insertdate] [datetime] NULL CONSTRAINT [DF__BitTest__insertd__300F11AC] DEFAULT (getdate()),
[a] [bit] NULL
) ON [PRIMARY]
GO
My application runs this code:
INSERT dbo.BitTest
(
    insertdate,
    a
)
VALUES
(DEFAULT, 9)
GO
What gets inserted for the most recent date/time value?

See possible answers