SQL validation improvements

Fixed some regex to assure the use of correct case in SQL queries.