PASS Summit Keynote Day 2
Bill Graziano opened the day with some very white knees as kilt day kicked off at the Summit this year!...
2011-10-14
850 reads
Bill Graziano opened the day with some very white knees as kilt day kicked off at the Summit this year!...
2011-10-14
850 reads
As I have announced in my "Advanced SQL Server Troubleshooting" session at SQLPASS
today, you can find here the
slides & samples for...
2011-10-14
788 reads
On Tuesday, October 18, 2011, I will be speaking at the Carolina Technology Conference in Columbia, SC. I'm scheduled for...
2011-10-14
1,414 reads
This week has been an exciting and memorable week for me. The last PASS Summit I attended was in 2009...
2011-10-14
1,847 reads
Got to David DeWitt’s Keynote a bit late so this will not cover as much as normal. (For the record,...
2011-10-14
497 reads
Starting the keynote on Wednesday, Bill Graziano talking about Kilt Day, quite a few of the bloggers wearing kilts (no,...
2011-10-13
606 reads
It is understandable that nations may undertake operations against other nations. This is believed to be the origin of StuxNet...
2011-10-13
952 reads
The keynote started out with Bill Graziano taking to the stage in a kilt and declaring that the second day...
2011-10-13
1,124 reads
Well, it can’t be done. You cannot move a table to a particular file in database.
What you can do is...
2011-10-13
2,121 reads
Introduction
Master Data Management (MDM), the process of creating and maintaining master data. As per definition Master Data Management (MDM) is a set of coordinated processes, policies, tools and technologies...
2011-10-13
416 reads
By Steve Jones
I’ve become an EV guy. I was talking with a friend who was selling...
In a previous post I talked about how we can use T-SQL Snapshot Backups...
By Steve Jones
A bit of a photo dump, but a few fun memories for me from...
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...
Comments posted to this topic are about the item Missing Returns
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