Subject FB 1.5.1 and 1.5.2 Shutdown abnormally with query
Author Luiz
Hi,

System: FB Superserver in Windows XP Pro

I have the next query statement that shutdown abnormally the server during
the prepare query:

The firebird log is: C:\Arquivos de
programas\Firebird\Firebird_1_5\bin\fbserver.exe: terminated abnormally
(4294967295)

Query:
"select B.Nome,
(select cast(coalesce(sum(case CC.evento
when 'E' then AA.qtde*L.preco_unit
when 'S' then -AA.qtde*L.preco_unit
end),0) as Numeric (9,2))
from movimentacao_itens_est AA
join movimentacao_est BB on AA.cod_movimentacao=BB.codigo
join tipo_mov_est CC on BB.cod_tipo_mov=CC.codigo
where AA.COD_MATERIAL=A.cod_material) as Total
from requisicoes_est C
join requisicoes_itens_est A on A.cod_requisicao=C.codigo
join almoxarifados_est B on B.codigo=C.cod_almoxarifado
join compras_Itens_est L on L.cod_material=A.cod_material
join compras_est M on M.codigo=L.cod_compra
where M.DATA IN(
SELECT MAX(C.DATA) FROM COMPRAS_est C WHERE
EXISTS(SELECT 1 FROM COMPRAS_ITENS_est D WHERE D.COD_COMPRA=C.CODIGO
AND D.COD_MATERIAL=L.COD_MATERIAL))
and C.Data between :di and :df
group by 1
order by 2 desc"

If I get rid off the group by clause the query prepare ok.

Luiz