Back at Small Data SF in 2025
Today I’m in San Francisco at Small Data SF 2025. I went to the conference last year and thought it was a great event. Watching people talk about data...
2025-11-05
31 reads
Today I’m in San Francisco at Small Data SF 2025. I went to the conference last year and thought it was a great event. Watching people talk about data...
2025-11-05
31 reads
Have you ever added a visual to a Power BI report page and published the updated report only to realize you forgot to adjust a related bookmark? It’s very...
2025-11-24 (first published: 2025-11-05)
238 reads
SQL Server Database Migration Pitfalls (and How to Fix Them)
Database migrations are where great product ideas go to die—unless you plan for SQL Server’s quirks and the realities of...
2025-11-21 (first published: 2025-11-05)
545 reads
Every Scooby-Doo episode has one thing in common — there’s always a fake ghost. Sometimes, that “ghost” is really just a guy in a mask trying to scare everyone...
2025-11-19 (first published: 2025-11-04)
534 reads
User Defined Functions is a new feature in PowerBI currently in public preview. There is a lot of buzz in the air regarding this because it opens new scenarios...
2025-11-19 (first published: 2025-11-04)
569 reads
There are some fundamental boxes that your reporting system must tick. ✅ The figures must be accurate A good reporting solution can be trusted. A bad one causes confusion...
2025-11-21 (first published: 2025-11-02)
462 reads
When it comes to managing complex database environments, having the right monitoring solution is critical. That’s why I’ve relied on Redgate Monitor at different points in my career. It...
2025-11-17 (first published: 2025-11-02)
318 reads
It can be tedious to check what visual interactions have been configured in a Power BI report. If you have a lot of bookmarks, this becomes even more important....
2025-11-14 (first published: 2025-10-31)
387 reads
foilsick – adj. feeling ashamed after revealing a little too much of yourself to someone – allowing them too clear a view of your pettiness, your anger, your cowardice,...
2025-10-31
75 reads
Accelerated database recovery was introduced in SQL Server 2019 and provides fast recovery, instantaneous transaction rollback, and aggressive log truncation. A complete overview of how ADR achieves this is...
2025-11-17 (first published: 2025-10-31)
493 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...
WhatsApp:0817781222 Jl. Kapten Muslihat No. 15 A, RT.01/RW.01, Pabaton, Kecamatan Bogor Tengah, Kota Bogor,...
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....
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