Windows Mobile Security
I'm working on a new article for SQL Server Central talking about physical security and SQL Server and I was...
2007-03-17
1,375 reads
I'm working on a new article for SQL Server Central talking about physical security and SQL Server and I was...
2007-03-17
1,375 reads
We migrated to a new set of servers tonight. Actually am for the Red Gate folks and a late, 11pm-2am...
2007-03-17
1,469 reads
SQL Server MVP Aaron Bertrand has posted that there is still a bug with maintenance plans for SQL Server 2005...
2007-03-15
1,459 reads
ApexSQL announced that a new version of ApexSQL doc is available.
News Announcement
The latest version is 2005.11.0203 and there are...
2007-03-14
1,532 reads
Here is a list of what was fixed:
http://support.microsoft.com/default.aspx/kb/914962
Downloads are available off of the SP2 home page:
http://www.microsoft.com/technet/windowsserver/sp2.mspx
Technorati Tags:Microsoft | Windows 2003
2007-03-14
1,476 reads
Yesterday's post reminded me of another interesting technique I have used to change the color of the values on a...
2007-03-11
1,340 reads
I found an interesting use for the IIF function in a Reporting Services report this week. I needed to provide...
2007-03-10
1,739 reads
There are two big SQL Server learning opportunities I want to remind you about. First, DevTeach/SQLTeach will be held in...
2007-03-09
1,812 reads
In order to assist those members of the Midlands PASS Chapter looking for new positions, I have put up a...
2007-02-26
1,359 reads
Boy that was fun. Getting a bunch of emails that we had been hacked and tracking down someone updating all...
2007-02-22
1,534 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