Some of the SQL code I developed for the Customer Migration project as part of Timoleon Software