Thursday 23 July 2009

NOTE: Integrity Constraints

Issue 1 of NOTE: featured an article on integrity constraints...

Integrity constraints were introduced with version 7 of SAS® software. In essence, they are rules that define the valid forms of your data. The rules can be defined in a number of ways and will be respected by SAS software whenever there is an attempt to update the data set.
You can create five different types of integrity constraint rules:
  • A column can contain only non-null values.
  • A column can contain only values that fall within a specific set, range, or list of values, or that duplicate a value in another column in the same row.
  • A column can contain only values that are unique.
  • A column that is a primary key can contain only values that are unique and that are not missing values.
  • A column that is a foreign key (the child) can contain only values that are present in the associated primary key (the parent) or null values. A column that is a primary key can contain only values that cannot be deleted or changed unless the same deletions or changes have been made in values of the associated foreign key. Values of a foreign key can be set to null, but values cannot be added unless they also exist in the associated primary key.
These integrity constraints are similar to those that have been available in industrial strength databases for many years. They are a useful means of ensuring the integrity of your data (including relational data) without repetitive coding in Base SAS programs (or SCL programs).

What will happen to NOTE: ?

We will steadily copy all relevant NOTE: articles from the archive to this blog so that this blog will form the new archive for NOTE:. Where appropriate or necessary we will update the articles.

Once we've begun to copy the old articles to here we'll also start posting new articles. In conjunction with this, we will invite NOTE: subscribers to use the blog and (optionally) subscribe to updates through any of the popular mechanisms.

Wednesday 22 July 2009

Welcome to the blog

Times change, and we're (belatedly) changing with them. Our irregular email newsletter named NOTE: is a very popular source of information for many, many SAS practitioners. Its archive remains (for the moment) at

The content and the quality of it won't change, but the delivery method will be via this blog. We will use this blog to post hints, tips and experience, plus news of developments at, *and* news of Andrew's forthcoming book (a must-read for all SAS developers).

Thanks for joining us...