Createing Dynamic SQL Here’s a great article on creating Dynamic SQL The Curse and Blessings of Dynamic SQL http://www.sommarskog.se/dynamic_sql.html