Error: No mapping between account names and security IDs was done
I recently decided to move over to Windows 8 so I can take advantage of Hyper-V and get off a...
2012-09-04
11,232 reads
I recently decided to move over to Windows 8 so I can take advantage of Hyper-V and get off a...
2012-09-04
11,232 reads
I was recently making some changes to my laptop setup and installing SQL Server 2008R2 and SQL Server 2012 directly...
2012-08-28
1,629 reads
If you have done a lot of work with SQL Server Analysis Services (SSAS) you may have seen this message:
We’ve...
2012-08-21
1,192 reads
Modifying the Windows host file can be a great way to ensure that you don’t accidentally modify production while doing...
2012-08-14
1,204 reads
We have all been there; you need to take a look at the data inside a file. Sure you can...
2012-08-07
1,804 reads
BCP, or bulk copy program, has been around in SQL Server for a long time. It is a great way...
2012-08-03 (first published: 2012-07-31)
10,950 reads
Color expressions in SSAS allow you to build an MDX expression to control the color of text displayed in a...
2012-07-27
1,697 reads
If you follow anything outside the regular SQL Server world coming from Microsoft it should be Office and more importantly...
2012-07-17
1,352 reads
The preview for Office 2013 is live!! You can hop over to the Microsoft website and grab it here: http://www.microsoft.com/office/preview/en/try-office-preview. Naturally...
2012-07-17
5,316 reads
I’m not exactly sure when this happened, but it looks like Microsoft has moved past the PowerPivot 2008R2 and PowerPivot...
2012-07-17
885 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...
WhatsApp:0817781222 Jl. Bina Insani No. 7G-7H, RT.003/RW.09, Kedung Jaya, Tanah Sareal, Kota Bogor, Jawa...
WhatsApp:0817781222 Jl. Kapten Muslihat No. 15 A, RT.01/RW.01, Pabaton, Kecamatan Bogor Tengah, Kota Bogor,...
Hi everyone, We previously used the Microsoft Access Database Engine 2016 (ACE) provider. As...
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