SQLSaturday Orlando Scheduled for October 7, 2023
The call for speakers is open! We’re always excited to have experienced and past speakers return (Rob Volk!), but if you’re a first time or relatively new speaker just...
2023-07-07
95 reads
The call for speakers is open! We’re always excited to have experienced and past speakers return (Rob Volk!), but if you’re a first time or relatively new speaker just...
2023-07-07
95 reads
Year 15 for Jacksonville! SQLSaturday Jax was held on May 6 this year, back at the usual location on the campus of the University of North Florida. At the...
2023-06-23 (first published: 2023-06-13)
226 reads
2023-05-12 (first published: 2017-06-09)
350 reads
A guest editorial from Andy Warren that looks at annual training to try and improve security.
2023-03-17 (first published: 2015-08-21)
256 reads
2023-01-16 (first published: 2015-06-26)
521 reads
First, the numbers. We registered 240 people, had about 110 on site. That’s definitely better than last year and still quite a bit under what it was pre-Covid. I’ll...
2022-11-04 (first published: 2022-10-19)
160 reads
A guest editorial from Andy Warren looking at the unlimited amount of vacation time from his company.
2022-08-31 (first published: 2017-07-12)
328 reads
2022-08-10 (first published: 2017-08-09)
312 reads
This year we’re back at our usual location on the campus of Seminole State College for SQLSaturday #1030. You may remember that last year we couldn’t use the college...
2022-08-01 (first published: 2022-07-25)
216 reads
I drove up to Jacksonville Friday afternoon to allow for bad traffic and immediately hit bad traffic, all four lanes of I-4 blocked that resulted in a 30 minute...
2022-05-24
112 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