Hard Core Object Oriented Programming Guidelines
I read Andrew Binstock occassionally in SD Times and in the most recent issue he posted a list of guidelines...
2008-05-21
1,715 reads
I read Andrew Binstock occassionally in SD Times and in the most recent issue he posted a list of guidelines...
2008-05-21
1,715 reads
Ran across this strange occurence while doing some testing. To duplicate the results (the actual code was a little more...
2008-05-20
1,498 reads
SQL Server MVP Frank Kalis has posted a short review on How to Cheat at Securing SQL Server 2005, a...
2008-05-20
1,911 reads
This is just a starting point for you to prepare for your interview so make sure not to limit yourself...
2008-05-19
4,089 reads
Here are your answers to the questions from last week You should get some variation of what I have given...
2008-05-19
2,769 reads
I have decided to make a short series of blogs about possible interview questions to help you prepare for an...
2008-05-19
3,028 reads
This is really interesting to me:
CREATE TABLE #TEMP (name varchar(80))
INSERT INTO #TEMP values ('Malteser Schloßschule')
INSERT INTO #TEMP values ('Malteser...
2008-05-19
737 reads
There are a few podcasts I tend to listen to as I have time. Since I work with a wide...
2008-05-19
4,054 reads
I've been working on a rough outline for two new classes that will each be one day long. One on...
2008-05-18
511 reads
As a president of a local PASS chapter, one of the things I've struggled with is getting "locals" to give...
2008-05-17
697 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