Brian Knight

Brian Knight, MCSE, MCDBA, is on the Board of Directors for the Professional Association for SQL Server (PASS) and runs the local SQL Server users group in Jacksonville. Brian is a contributing columnist for SQL Magazine and also maintains a weekly column for the database website SQLServerCentral.com. He is the author of Admin911: SQL Server (Osborne/McGraw-Hill Publishing) and co-author of Professional SQL Server DTS (Wrox Press). Brian is a Senior SQL Server Database Consultant at Alltel in Jacksonville and spends most of his time deep in DTS and SQL Server.

SQLServerCentral Article

Tutorial: Changing the Visibility Objects in Reporting Services

In the last tutorial in this series of Reporting Services tutorials we added conditional formatting to the report. Now that we have created our first report and have added a bit of flare to it, we will go ahead and make it even cleaner. In this very quick demonstration, we will go ahead and change the visibility of rows or columns based on given conditions.

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

(1)

You rated this post out of 5. Change rating

2004-07-20

18,127 reads

SQLServerCentral Article

Don't Get Left Behind

Production DBAs may be a dying breed. At least according to some sources. While we're not sure that we agree with that, there is definitely a trend that should have you working on your career. The day of the DBA that only manages the operational data store is waning. Today's DBAs need to be flexible and have a number of other skills. Brian Knight looks at a few of the skills that you might to add to your arsenal to be prepared for the future of SQL Server.

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

(3)

You rated this post out of 5. Change rating

2004-05-21

10,980 reads

SQLServerCentral Article

SQL Server 2005 Feature Survey Results

A week ago, we solicited readers to let Microsoft know which of the SQL Server 2005 announced features mattered most to them. We had a great response, with 890 of you answering the survey in three days. The answers were pretty interesting. The full results can be seen at the bottom of this article.

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2004-03-22

11,257 reads

SQLServerCentral Article

Yukon Delayed Again and Named

Microsoft confirmed today that it has delayed Yukon yet again. It also announced that Yukon has an official name and will have another beta added to the development cycle. Get all the info here and share with Microsoft your thoughts about what features are important to you.

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2004-03-11

17,826 reads

Blogs

Microsoft Ignite Announcements Nov 2026

By

Microsoft shared another large set of announcements at Microsoft Ignite, held November 17–20 in...

What's New in SQL Server for the Developer: SQL Server 2017

By

Part 3 of my What's New in SQL Server for the Developer series. SQL...

Embracing Hardship with Gratitude

By

I once kept a gratitude journal and I still have a task on my...

Read the latest Blogs

Forums

Transport-level error when querying Excel metadata using sys.sp_tables_ex...

By jellybean

Hi everyone, We previously used the Microsoft Access Database Engine 2016 (ACE) provider. As...

Perform Regression After Migration from SQL 2014 TO 2022 (Physical to Virtual)

By abdalah.mehdoini

Hello, We recently migrated a database from SQL Server 2014 to SQL Server 2022....

Detecting Outliers in Power BI using Z-Score

By Dinesh Asanka

Comments posted to this topic are about the item Detecting Outliers in Power BI...

Visit the forum

Question of the Day

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
)
GO
There 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