So, I have this SQL query:

Code:
SELECT SDATE, FNAME, LNAME, DEPARTMENT, INITIALDATE, EMPTYPE, SET1, SET4, SET4OTHER, SET32, SET33 FROM KUHR.exittest WHERE SDATE BETWEEN TO_DATE('" + date_start + "') AND TO_DATE('" + date_end + "') AND DEPARTMENT LIKE '%- " + arsp_num + "% -%' AND SET33 NOT LIKE 'Not Answered'
It works.

If I do this instead, it does not:

Code:
SELECT COUNT(SDATE), SDATE, FNAME, LNAME, DEPARTMENT, INITIALDATE, EMPTYPE, SET1, SET4, SET4OTHER, SET32, SET33 FROM KUHR.exittest WHERE SDATE BETWEEN TO_DATE('" + date_start + "') AND TO_DATE('" + date_end + "') AND DEPARTMENT LIKE '%- " + arsp_num + "% -%' AND SET33 NOT LIKE 'Not Answered'
It's probably something simple I'm doing, but I just can't figure it out .