Not a group by expression

From: astalavista <>
Date: Thu, 15 May 2008 21:45:05 +0200
Message-ID: <482c92c2$0$19974$>


When I try an explain plan on the query below I received ORA-00979: not a GROUP BY expression

Do you know why ?

SELECT SUBSTR (entry_datetime, :"SYS_B_00", :"SYS_B_01"), entry_id, COUNT (*)

FROM (SELECT entry_datetime, entry_id FROM cl318886012.inf_errorstatus

WHERE entry_datetime >= TO_DATE (:"SYS_B_02", :"SYS_B_03")

AND entry_datetime < TO_DATE (:"SYS_B_04", :"SYS_B_05")

AND ctv_dstatus = :"SYS_B_06"

AND entry_id LIKE :"SYS_B_07"

AND ctv_error_id NOT IN ( SELECT ctv_error_id

FROM cl318886012.inf_errorstatus_audit

WHERE ctv_dstatus = :"SYS_B_08"

AND entry_datetime >= TO_DATE (:"SYS_B_09",:"SYS_B_10")))

GROUP BY SUBSTR (entry_datetime, :"SYS_B_11", :"SYS_B_12"), entry_id Received on Thu May 15 2008 - 14:45:05 CDT

Original text of this message