title: Issue with SQL statement
body: <p>Following is SQL statement within stored procedure which returns records fine. However, I also need the value for MEMBER_ID. When I add this to the select statement then no records are returned. I tried CAST and CONVERT, but no results. For reference the field MEMBER_ID is the key value in both tables. It is an INT.</p>
  
  <pre><code>SELECT
    CONCAT(WEBFSS.MEMBERS.LAST_NAME, ", " ,WEBFSS.MEMBERS.FIRST_NAME) As Name,
    SUM(CASE WHEN WEBFSS.SCHEDULE.DATE = _mon THEN WEBFSS.SCHEDULE.QTY END) AS MEALS1,
    SUM(CASE WHEN WEBFSS.SCHEDULE.DATE = _mon THEN WEBFSS.SCHEDULE.ENSURE END) AS ENS1,
    SUM(CASE WHEN WEBFSS.SCHEDULE.DATE = _tue THEN WEBFSS.SCHEDULE.QTY END) AS MEALS2,
    SUM(CASE WHEN WEBFSS.SCHEDULE.DATE = _tue THEN WEBFSS.SCHEDULE.ENSURE END) AS ENS2,
    SUM(CASE WHEN WEBFSS.SCHEDULE.DATE = _wed THEN WEBFSS.SCHEDULE.QTY END) AS MEALS3,
    SUM(CASE WHEN WEBFSS.SCHEDULE.DATE = _wed THEN WEBFSS.SCHEDULE.ENSURE END) AS ENS3, 
    SUM(CASE WHEN WEBFSS.SCHEDULE.DATE = _thu THEN WEBFSS.SCHEDULE.QTY END) AS MEALS4,
    SUM(CASE WHEN WEBFSS.SCHEDULE.DATE = _thu THEN WEBFSS.SCHEDULE.ENSURE END) AS ENS4,   
    SUM(CASE WHEN WEBFSS.SCHEDULE.DATE = _fri THEN WEBFSS.SCHEDULE.QTY END) AS MEALS5,
    SUM(CASE WHEN WEBFSS.SCHEDULE.DATE = _fri THEN WEBFSS.SCHEDULE.ENSURE END) AS ENS5
   FROM WEBFSS.SCHEDULE
    INNER JOIN WEBFSS.MEMBERS
      ON WEBFSS.SCHEDULE.MEMBER_ID = WEBFSS.MEMBERS.MEMBER_ID
  WHERE
    (WEBFSS.SCHEDULE.DATE BETWEEN _mon AND _fri) 
  GROUP BY
   WEBFSS.MEMBERS.LAST_NAME, WEBFSS.MEMBERS.FIRST_NAME ;
  </code></pre>
  
  <p>This does not work:</p>
  
  <pre><code>SELECT
    SCHEUDLE.MEMBER_ID,
    CONCAT(WEBFSS.MEMBERS.LAST_NAME, ", " ,WEBFSS.MEMBERS.FIRST_NAME) As Name,
    SUM(CASE WHEN WEBFSS.SCHEDULE.DATE = _mon THEN WEBFSS.SCHEDULE.QTY END) AS MEALS1,
  </code></pre>