Fix SQL sentences for avoid problems with SQL keywords - refs BT#8566