Привет
Попросили изменить запрос IB 6.0
select rcin.TOV,
t.NAME,
(select sum(rcout.CNT)
from MN_HD_TOV_OUT hdout, MN_RC_TOV_OUT rcout
where (hdout.dat between :dbeg and :dend) and
(hdout.podr=:podrotgr) and
(rcout.doc=hdout.kod) and
(rcout.tov=rcin.tov)) as cntotgr
from MN_HD_TOV_IN hd, MN_RC_TOV_IN rcin, SPR_TOV t
where (hd.dat between :dbeg and :dend) and
(hd.PODR=:podr) and
(hd.type_doc=4) and
(rcin.DOC=hd.KOD) and
(t.KOD=rcin.TOV) and
(hd.KOD_OUT_NAKL is null) and
(rcin.cnt<>0)
group by rcin.TOV, t.NAME
order by rcin.TOV
group by тут нафига. 6.0 такое пропускает?
Дмитрий