Move BuildSqlGroups with case problem