How To Call APIs From SQL Server
Calling an API has been in Azure SQL since 2022, but it was only recently added to SQL Server 2025 Preview. This new feature...
2025-07-01
48 reads
Calling an API has been in Azure SQL since 2022, but it was only recently added to SQL Server 2025 Preview. This new feature...
2025-07-01
48 reads
(2025-June-30) Working with different abbreviations or acronyms can speed up communication, but at the same time, it can exclude those who are not familiar with them. Sometimes this exclusion happens...
2025-07-01 (first published: 2025-06-30)
174 reads
Hello Hello, We. Are. Back! The schedule for EightKB 2025 Edition has been announced! We’re kicking off at 1pm UTC on August 21st…here’s the schedule: – N.B. – If...
2025-06-30
90 reads
A while ago I was looking into some odd errors that were cropping up in an application, when I spotted that all the columns in a table were defined...
2025-06-30
160 reads
The more I look to GenAI to save me minutes, short periods of time, the better it works. Here’s an example of something I do regularly where AI helps....
2025-06-30
268 reads
I will be back in Seattle this year attending the 2025 PASS Data Community Summit. This will mark my fourth year attending the Summit (I also attended one year...
2025-06-27
63 reads
Another of our values is this: Motivation isn’t about carrots and sticks. Constant oversight and the threat of punishment are incompatible with great, fulfilling work. We believe in creating...
2025-06-27
99 reads
Today is my last day of work for six weeks. I start my sabbatical Monday, or maybe this afternoon, and will be gone. I may or may not blog,...
2025-06-27
79 reads
I’m really excited to share some new functionality in SQL Server 2025 combined with some innovations in FlashArray’s REST API.
In this post, I’m going to show you how to...
2025-06-27
140 reads
Brent had a query exercise recently about train stations moving in some order and having overrides to this order in emergencies. I suppose he’s been traveling a lot lately...
2025-06-27
48 reads
By ReviewMyDB
Part 3 of my What's New in SQL Server for the Developer series. SQL...
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...
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