bug 1137: Missing space in SQL query