views:

106

answers:

0

What's the problem with this DQL ? When I remove the TO_DATE in GROUP BY "it's work", between I need it there!

SELECT COUNT(t.codigo), TRUNC((t.dataCadastro - TO_DATE('2010-01-01 00:00:00', 'YYYY-MM-DD HH24:MI:SS'))/1)*1 + TO_DATE('2010-01-01 00:00:00', 'YYYY-MM-DD HH24:MI:SS') FROM TarefaNegociacao t GROUP BY TRUNC((t.dataCadastro - TO_DATE('2010-01-01 00:00:00', 'YYYY-MM-DD HH24:MI:SS'))/1)*1 + TO_DATE('2010-01-01 00:00:00', 'YYYY-MM-DD HH24:MI:SS')