I've introduced unique variable names which should work (it does on my local Sql Server 2005). Could you give it a try ? Tom