Issues Installing SQL 2008 R2 on Server 2012 R2 Clustering
Oh so the nightmare begins.
At the bottom I've included a set of links where I found my answers. What I'm...
2014-03-03
11,961 reads
Oh so the nightmare begins.
At the bottom I've included a set of links where I found my answers. What I'm...
2014-03-03
11,961 reads
Free Month of PluralSight!
Ok, personally this is pretty cool. www.SQLSkills.com is giving away a free month to pluralsight! Well, let...
2014-02-25
1,284 reads
SQL Saturday OKC is coming up!
The event will be August 23rd, 2014!
Now is the time to get signed up. We...
2014-02-24
520 reads
Last Monday was the first time I've ever presented anything. Honestly, it was the first time really speaking in public...
2014-02-17
670 reads
I'm going down memory lane here and remembering one of the first things I did as a DBA. I was...
2014-02-10
623 reads
One issue I've found a bit troublesome is trying to find out what's in a specific Filegroup. Let's say you're...
2014-02-03
390 reads
This one is a bit off for me. I've had to make SSIS exports kick out in specific ways such...
2014-01-29 (first published: 2014-01-27)
1,536 reads
This is something I've found useful here recently when I had a server acting up. It's a simple way to...
2014-01-22
1,065 reads
We tend to think of ourselves as self reliant. Sit and think for a second, how many people do you...
2014-01-24 (first published: 2014-01-20)
1,287 reads
There are a few posts running around talking about restoring master from backup. Thomas LaRock has a fantastic "How To:...
2014-01-15
634 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