To the person who wanted to comment every line of his dynamic SQL I can have two words for you, stored procedure.In 25+ of developing software I have learned that flexibility is the most important thing to have especially in the Microsoft world where things change all the time.I have written C and as a personal preference I do not particularly like case sensitivity, Curly brackets or semi-colons.