• Can I just point out that the code is not SQL 2000 compatible, despite what it says at the top, because of the use of ROW_NUMBER()?