Finding the Next Sequence Value: #SQLNewBlogger
I saw a question asking about the next sequence value and decided to try and answer it myself. I assumed this would be easy, and it was, but I...
2026-04-15 (first published: 2026-03-30)
210 reads
I saw a question asking about the next sequence value and decided to try and answer it myself. I assumed this would be easy, and it was, but I...
2026-04-15 (first published: 2026-03-30)
210 reads
Following up on my Part 1 baseline, the journey from 2017 onward changed how we look at the “Engine.” We moved from Service Packs to a faster world of...
2026-03-28 (first published: 2026-03-27)
54 reads
In cryptography, the RSA and ECC algorithms which we use primarily for asymmetric cryptography are susceptible to Shor's Algorithm in quantum cryptography. Cracking those algorithms with classical computing is...
2026-04-08 (first published: 2026-03-27)
336 reads
In today’s world, this might mean something different, but in 2010, we had this value: In our context, this was about being open and transparent. This is the text...
2026-03-27
62 reads
A while back I posted about a couple of side projects that I’ve been working on when I get the chance. One of those was the Burrito Bot…a bot...
2026-04-06 (first published: 2026-03-27)
402 reads
Continued thinking about my Journey blog where we have to look back at the revolutionary of SQL Server till SQL Server 2025. I would like to brief more on...
2026-03-27 (first published: 2026-03-26)
42 reads
A ton of new features for Microsoft Fabric were announced at the Microsoft Fabric Community Conference (FabCon Atlanta 26) last week (see the FabCon keynote here). There were 8000 attendees! Here...
2026-04-08 (first published: 2026-03-26)
1,536 reads
PowerShell Remoting for SQL DBAs: WinRM + SSH Guide (Updated 2026)
Originally published in 2023, this post never made it into Google's index, so I'm republishing it...
2026-04-03 (first published: 2026-03-26)
741 reads
We’re coming back to New York, which is exciting for me. I love NYC. The Redgate Summit 2026 – New York City comes back on May 5, 2026. You...
2026-04-03 (first published: 2026-03-25)
194 reads
I previously wrote about how the underlying technology for Fabric mirroring changed with SQL Server 2025. The latest version of mirroring that uses the SQL Server Change Feed is...
2026-04-01 (first published: 2026-03-24)
439 reads
By Brian Kelley
I once kept a gratitude journal and I still have a task on my...
By Arun Sirpal
The goal is simple: register AgentDBA as an MCP server in Claude Code, so...
By Steve Jones
I was excited to try out the latest release of SSMS, v22.12.1 for this...
Hi everyone, We previously used the Microsoft Access Database Engine 2016 (ACE) provider. As...
Hello, We recently migrated a database from SQL Server 2014 to SQL Server 2022....
Comments posted to this topic are about the item Detecting Outliers in Power BI...
I have a few tables in my SQL 2025 database:
CREATE TABLE [dbo].[Customer] ( [CustomerID] [int] NOT NULL, [CustomerName] [varchar] (200) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, [AddressKey] [int] NULL, [CustomerStatus] [int] NULL, [CustomerContact] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, [ContactEmail] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, [PreferredName] [char] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ) ON [PRIMARY] GO ALTER TABLE [dbo].[Customer] ADD CONSTRAINT [CustomerPK] PRIMARY KEY CLUSTERED ([CustomerID]) ON [PRIMARY] GO CREATE TABLE [dbo].[Orders] ( [OrderID] [int] NOT NULL, [CustomerID] [int] NOT NULL, [ProductID] [int] NOT NULL, [OrderDate] [date] NOT NULL, [Quantity] [int] NOT NULL ) ON [PRIMARY] GO ALTER TABLE [dbo].[Orders] ADD CONSTRAINT [PK__Orders__C3905BAFE0146D59] PRIMARY KEY CLUSTERED ([OrderID]) ON [PRIMARY] GO ALTER TABLE [dbo].[Orders] ADD CONSTRAINT [FK_Orders_Customers] FOREIGN KEY ([CustomerID]) REFERENCES [dbo].[Customers] ([CustomerID]) GO ALTER TABLE [dbo].[Orders] ADD CONSTRAINT [FK_Orders_Products] FOREIGN KEY ([ProductID]) REFERENCES [dbo].[Products] ([ProductID]) GO CREATE TABLE dbo.CustomerReturn ( EntryID INT NOT NULL CONSTRAINT CustomerReturnPK PRIMARY KEY , CustomerID INT , ReturnDate DATETIME , OrderID INT NOT NULL ) GOThere are multiple rows in all these tables. I am trying to find how many customers have never returned anything, and I run this:
SELECT count(*)
FROM dbo.Customer
WHERE CustomerID NOT IN
(
SELECT CustomerID FROM dbo.CustomerReturn
);
I get zero rows, but I know there are customers who have not returned anything. What is wrong? See possible answers