Advanced

Technical Article

Using Views to Enforce Business Rules

  • Article

A view is most commonly thought of as a SELECT statement. Most developers will simply create a view to "group" complex SELECT statements for reuse within another view or stored procedures. It makes typing easier! But the really power of views is their ability to implement business rules.

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2007-04-23

4,528 reads

SQLServerCentral Article

Sic Semper NULL

  • Article

The great debate over NULLs will probably never end. Should we use them in our databases? What meaning do they have? These are all
valid questions. In this article SQL Server expert Michael Coles takes a look at the problems that are inherent in eliminating NULLs completely from
a database.

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

(2)

You rated this post out of 5. Change rating

2007-04-10

6,006 reads

External Article

Database Design: A Point in Time Architecture

  • Article

In most relational database implementations. Update and Delete commands destroy the data that was there prior to their issue. However, some systems require that no information is ever physically deleted from or updated in the database. In this article, Arthur Fuller presents a solution to this requirement in the form of a Point-in-Time architecture: a database design which allows a user to recreate an image of the database as it existed at any previous point in time, without destroying the current image.

2007-02-28

3,723 reads

Technical Article

CHAPTER FOUR: ORGANIZATIONALLY, WHERE DOES DATA GOVERNANCE FIT?

  • Article

This is the fourth part of an ongoing series. The series is titled The Data Stewardship Approach to Data Governance. For information regarding future chapters, please use my contact information below. Previous articles were titled The Data Won't Govern Itself, Data Governance Is NOT a Methodology and The Tools of Data Governance.

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2007-01-23

1,705 reads

External Article

Refactoring Databases: The Process

  • Article

This article describes how to implement a single refactoring within your database. It contains a worked example of the Move Column structural refactoring, whereby we move the Customer.Balance column to the Account table, a seemingly straightforward change to improve the database design.

2007-01-16

3,244 reads

SQLServerCentral Article

Table Defaults

  • Article

In working on an existing database, DBAs often look to normalize tables and correct obvious flaws in design. Recently Andy Warren was working on a consulting project and realized that defaults would prevent many issues.

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

(5)

You rated this post out of 5. Change rating

2007-12-28 (first published: )

7,201 reads

Technical Article

Design Challenge: Global Address

  • Article

Are you up to the latest design challenge? A great way to sharpen our analysis and modeling skills is to continuously address real-world scenarios. A modeling scenario with suggested solutions appears each month in this Design Challenge column. The scenario is emailed to more than 1,000 modelers. The responses are then consolidated into this column.

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2006-10-16

2,039 reads

Blogs

Goodbye, Microsoft

By

A few years ago I took a new job at Microsoft, working as a...

The SUM of Nothing: #SQLNewBlogger

By

I caught this interesting item over on Pinal Dave’s blog: Eleven Interview Questions that...

How to Move the SSMS Status Bar to the Top and Color-Code SQL Server Connections

By

I use color-coded connections in SSMS to distinguish Production, Pre-Production, UAT, and Development. But...

Read the latest Blogs

Forums

Today's AI

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Today's AI

Split Large Queries in Athena with a Simple Modulo Trick

By Rahul Gupta

Comments posted to this topic are about the item Split Large Queries in Athena...

Finding Trailing Spaces

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Finding Trailing Spaces

Visit the forum

Question of the Day

Finding Trailing Spaces

I have some data in a SQL Server 2025 database. It looks like this for the dbo.Customer table:

CustomerID CustomerName PreferredName
1          Steve        Steve               
2          Andy         Andy               
3          Brian        Brian               
4          Allan        Allan               
5          Devin        Devin               
6          Steve        Steve               
7          Sally        Sally
I want to detect which names have a single trailing space. The CustomerName is a varchar() and the PreferredName is a CHAR(). Does this query detect the problem rows?
SELECT 
       CustomerID,
       CustomerName,
       PreferredName
FROM Customer
WHERE CustomerName <> RTRIM(CustomerName)
OR PreferredName <> RTRIM(PreferredName);

See possible answers