Joe Celko


Arrays in SQL that Avoid Repeated Groups

It is certainly possible to fake an Array in SQL, but there are only a few occasions when it would be the best design. Most often, the wish for an array in SQL is a sign of a forlorn struggle against poorly-normalised data. One of the worst sins against Codd is the repeating group, as Joe Celko explains.

2011-07-20

3,438 reads

Improving Comparison Operators and Window Functions

It is dangerous to assume that your data is sound. SQL already has intrinsic ways to cope with missing, or unknown data in its comparison predicate operators, or Theta operators. Can SQL be more effective in the way it deals with data quality? Joe Celko describes how the SQL Standard could soon evolve to deal with data in ways that allow aggregation and windowing in cases where the data quality is less than perfect.

2011-04-01

6,632 reads

The DIS-Information Principle: A Splitting Headache

You can easily re-factor bad DML code, but if a database design is wrong, you can do little to rescue the problem, even with expert queries. So what constitutes 'wrong RDBMS design? What are these errors that continually crop up? How can you recognise them and fix them? Joe embarks on a new series of articles by identifying a series of bad practices based on the habit of 'splitting' that which shouldn't be split.

2010-09-08

2,767 reads

Celko's SQL Stumper: The Class Scheduling Problem

What can we use in SQL instead of E. F. Codd's T theta operators for best-fit? Joe Celko returns with another puzzle that isn't new, in fact it already features “Swedish”, “Croatian” and “Colombian” solutions in chapter 17 of Joe's 'SQL for Smarties' book. These were all written before CTEs or the new WINDOW functions. Is there now a better solution? Was there one even then? We leave it to the readers to provide the answer!

4 (3)

2010-01-25

1,636 reads

Blogs

The First Data Saturday is Tomorrow

By

Data Saturday #2 – Guatemala is tomorrow. This is the first event on the...

Daily Coping 22 Jan 2021

By

I started to add a daily coping tip to the SQLServerCentral newsletter and to...

Daily Coping 21 Jan 2021

By

I started to add a daily coping tip to the SQLServerCentral newsletter and to...

Read the latest Blogs

Forums

Need to strip off the beginning of a field in SELECT statement

By tim8w

I have this table that unfortunately has spaces in the field, which I am...

Aliasing an instance name for remote connections

By Brandie Tarvin

It's been a long time since I set up a 2012 server. We have...

Looking for tips on Optimizing

By Mr. Brian Gale

I am probably going about this the wrong way, but my current solution is...

Visit the forum

Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers

Question of the Day

Amend a Commit

See possible answers