Updated SQL to be compatible with SQL Azure and therefore Project Nami.