How do you find gaps in a Sequence of numbers? A reader asked, and two experts, Brian and Tejas, replied with good scripts. Here are both solutions.
PERCENTILE_DISC: Return an Observed Percentile Value
PERCENTILE_DISC selects from the supplied observations. Preserve duplicates and distinguish an observed threshold from an interpolated value.
Data Mining: A Simple Introduction and a SQL Basket Example
Market-basket analysis turns purchases into measurable product relationships. Deduplicate products within each order, calculate support, confidence and lift in T-SQL, and interpret the counts before drawing conclusions from a small sample.
SQL SERVER – Mirrored Backup and Restore and Split File Backup – Introduction
Backup and Restore lessons from my consulting work: conventional backups, split file backups, mirrored backups and the FORMAT clause, each with an example.
DATEADD Nanoseconds: Round to datetime2 Ticks
DATEADD nanoseconds do not provide single-nanosecond storage. Test rounding thresholds with an explicit datetime2(7) input.
Oracle to SQL Server: Translating NVL, ROWNUM and Sequences
Translate Oracle to SQL Server expressions for NULLs, row limits, dates, sequences and concatenation, and test where they differ.
Central Management Servers and Registered Servers
Use Central Management Servers and registered servers in SSMS to organize SQL Server instances and run safe read-only queries across groups.







