syntax changes on sql queries