Lesson learnt - don't mess with the SQL stuff without thinking twice, and having a 1500+ page SQL book on your lap!