Issue #2238225 by schultetwin: Fixed bad SQL query due to uppercase alpha character in "AS" keyword.