07 April 2011
07 April 2011

Check your Digits

The most persistent struggle in data processing has been to ensure clean data. There are many ways that data can be incorrect and a database must check, as best it can, that the data is correct. The CHECK constraint is ideally suited for this sort of work, and the checking routine can become quite complex when dealing with check digits in data. … Read more
30 March 2011
30 March 2011

How to Import Data from HTML pages

It turns out that there are plenty of ways to get data into SQL Server from websites, whether the data is in tables, lists or DIVs Phil finds to his surprise that it is easier to use Powershell and the HTML Agility Pack, than some of the more traditional approaches. Web-scraping suddenly becomes more resilient.… Read more
25 November 2010
25 November 2010

The DELETE statement in SQL Server

Of the big four DML statements in SQL Server, the DELETE is the one least written about. This is odd considering the extra power conferred on the statement by the addition of the WITH common_table_expression; and the OUTPUT clause that essentially allows you to move data from one table to another in one statement. … Read more
28 October 2010
28 October 2010

VALUES() and Long Parameter Lists – Part II

The use of the comma-separated list of parameters to a SQL routine, that Phil Factor calls the 'comedy-limited list, is a device that makes seasoned SQL Database developers wince. The best choice of design for passing variable numbers of parameters or tuples to SQL Routines varies according to the importance to you of SQL Standards. Joe Celko discusses the pros and cons of the front-runners … Read more
27 September 2010
27 September 2010

Working with the INSERT statement in SQL Server

The INSERT statement in SQL Server is versatile. It now allows the insertion of multiple rows of literal values. It also provides the output clause that solves a number of common problems such as ascertaining the value of identity fields, and other calculated fields in tables, or for auditing the rows that are added to tables. Robert, once again, gives a clear introduction. … Read more
10 September 2010
10 September 2010

Showplan Operator of the Week – Stream Aggregate

Fabiano continues his mission to explain the Query Optimiser in practical terms, describing, one week at a time, all the major Showplan Operators used by SQL Server's Query Optimiser to build the Query Plan. He discusses the Stream Aggregate function and shows how easy it is to get performance gains in GROUP BY clauses by choosing the right index.… Read more
22 July 2010
22 July 2010

VALUES() and Long Parameter Lists

To make progress as a relational Database programmer, you have to think in terms of sets, rather than lists, arrays or sequential data. Until that point, you'll feel the need to pass lists, arrays and the like to functions and procedures. Joe suggests some unusual ways around the difficulty and broods on the power of the VALUES constructor.… Read more