This is a SQL question and I am running out of ideas I need help from a pro, below is my SQL statement what I am trying to do is to get amount totals by month, the field IDSHPD is a date field that will show as follows for example "20130101" What I am getting is by the day along with the month I just want by the month only. If I take out IDSHPD I get and error message "Column or Expression in SELECT list not valid" Can anybody give me a work around solution. I am a newbie. Thank you in advance.

SELECT CASE SUBSTR(IDSHPD, 5, 2) WHEN 01 THEN 'Jan' WHEN 02 THEN 'Feb' WHEN 03 THEN 'Mar' WHEN 04 THEN 'Apr' WHEN 05 THEN 'May' WHEN 06 THEN 'May' WHEN 06 THEN 'Jun' WHEN 07 THEN 'Jul' WHEN 08 THEN 'Aug' WHEN 09 THEN 'Sep' WHEN 10 THEN 'Oct' WHEN 11 THEN 'Nov' WHEN 12 THEN 'Dec' ELSE '' END AS "Month", SUBSTR(IDSHPD, 5, 2) AS Mo, SUBSTR(IDSHPD, 7, 2) AS "Day", SUBSTR(IDSHPD, 1, 4) AS "Year", SUM(IDAMTP) AS Amount, IDSHPDFROM MEMDTANNA.INSDTLWHERE (SUBSTR(IDSHPD, 1, 4) = "YEAR"(CURRENT_DATE))GROUP BY SUBSTR(IDSHPD, 1, 4), SUBSTR(IDSHPD, 5, 2), IDSHPD, SUBSTR(IDSHPD, 7, 2)ORDER BY IDSHPD