Data Dude
I went to an abbreviated version of the Visual Studio 2005 Team Edition for Database Professionals launch this morning. The...
2006-11-30
1,601 reads
I went to an abbreviated version of the Visual Studio 2005 Team Edition for Database Professionals launch this morning. The...
2006-11-30
1,601 reads
I've heard a lot of complaints about SQL Server Management Studio concerning slowness and some of the things, like scripting...
2006-11-28
1,385 reads
Sadly, I haven't had much experience yet with SQL Server 2005 except for Reporting Services and SSIS. The majority of...
2006-11-27
1,432 reads
While at PASS, I created a thread in the forums: http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=61&messageid=322277 . It was an incredible week. I look forward to...
2006-11-20
1,330 reads
SQL Server 2000 and Access databases can be configured to work closely together. If you find that the Access storage format is not handling your needs and an upgrade is needed, you need not through away all of your access development. Instead, you can link Access tables to underlying tables in SQL Server and improve your application by using SQL Server as the backend for your Access project. Author Kathi Kellenberger brings us her second articles in an Access series looking at Linking tables to
2006-11-17 (first published: 2005-02-23)
45,639 reads
My daughter-in-law just reminded me on Sunday that her birthday was in 21 days. Yikes! That's the day I fly...
2006-10-26
1,355 reads
In this video, Kathi continues her T-SQL series and exands how to use the WHERE clause.
2006-10-26
3,469 reads
In this second part video from Kathi, she covers how to write T-SQL in much more indepth. She covers how to handle NULLs and many more items in this video.
2006-10-12
2,787 reads
In this video, you'll learn how to write basic select statements. This beginner video takes you from the ground up writing T-SQL.
2006-10-04
3,402 reads
If you are new to SQL Server, you might be interested in viewing a video that covers the terms you use...
2006-09-11
1,601 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