MVP 2009
I was re-awarded MVP status from Microsoft for 2009. Since I didn’t hear anything to the contrary in the last...
2009-01-01
459 reads
I was re-awarded MVP status from Microsoft for 2009. Since I didn’t hear anything to the contrary in the last...
2009-01-01
459 reads
I'm not a big goals person. I think it's a good idea to set goals, and they can help you,...
2009-01-01
453 reads
If you'd like to keep up with your profession as a SQL DBA, I thoroughly recommend certification. It has certainly...
2009-01-01
2,033 reads
Only a few changes planned for this coming year to the blog (so far), none of them huge:
I plan to...
2008-12-31
1,417 reads
Something new for the end of the year - a recap of everything I posted for 2008. 303 posts if the...
2008-12-30
1,551 reads
Till know everyone has the information for the SQL Server 2005 SP3 for all versions!
Download info here
What's new in SP3!...
2008-12-30
1,456 reads
Pershendetje te gjitheve!
Përderisa kemi qenë duke punuar me SQL Server 2005 SP2, pas shumë raportimeve nga ana e shfrytëzuesve...
2008-12-30
1,546 reads
XBRL is yet another use of XML, this time for financial reporting. It is supposed to be in place for...
2008-12-30
1,730 reads
Steve Jones tells me that the biggest advantage that the Kindle offers is the ability to browse and buy a...
2008-12-29
1,404 reads
So I’ve spent the last couple of weeks playing around with the Seadragon application and have come to some conclusions.
Usefullness...
2008-12-29
1,489 reads
By James Serra
Microsoft shared another large set of announcements at Microsoft Ignite, held November 17–20 in...
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...
Telp/Wa 628217555651 Jl. Raya Singosari No.91 A, Losari, Kec. Singosari, Kabupaten Malang, Jawa Timur...
Telp/Wa 62817825533 Jl. Ahmad Yani No.183, Purwodadi, Kec. Blimbing, Kota Malang, Jawa Timur 65125
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