rbragg Posted January 24, 2008 Share Posted January 24, 2008 I get the ORA-00936: missing expression error here: SELECT COUNT(call_num) AS CALL, COUNT(CASE WHEN status_num = 1 THEN status_num END) AS CLOSED, COUNT(CASE WHEN status_num = 2 THEN status_num END) AS OPEN, COUNT(CASE WHEN status_num = 3 THEN status_num END) AS JACK, COUNT(CASE WHEN status_num = 4 THEN status_num END) AS TECHFOLLOWUP, COUNT(CASE WHEN status_num = 5 THEN status_num END) AS RESNETFOLLOWUP, COUNT(CASE WHEN status_num = 6 THEN status_num END) AS HOT, COUNT(CASE WHEN status_num = 7 THEN status_num END) AS PROGRESS, COUNT(CASE WHEN status_num = 8 THEN status_num END) AS APPT, COUNT(CASE WHEN status_num = 9 THEN status_num END) AS STUDENT, COUNT(CASE WHEN status_num = 10 THEN status_num END) AS THIRD, FROM schema.table; Can anyone see where the problem is?? Thanks in advance! Quote Link to comment https://forums.phpfreaks.com/topic/87560-solved-ora-00936-missing-expression/ Share on other sites More sharing options...
rbragg Posted January 24, 2008 Author Share Posted January 24, 2008 Nevermind. I needed to remove the comma from the last case. Quote Link to comment https://forums.phpfreaks.com/topic/87560-solved-ora-00936-missing-expression/#findComment-447846 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.