Subject Re: [firebird-support] fb 1.0 => 1.5 having doesnt work any more
Author Svein Erling Tysvaer
At 14:37 08.07.2003 +0000, you wrote:
>Select ZiBelegNr, Min(SplitDate) as "Splitter-Datum" from RsvKat
>group by ZiBelegNr, splitdate
>having (SPLITDATE is not null)


Select distinct ZiBelegNr, SplitDate as "Splitter-Datum"
from RsvKat k1
where not exists(
Select * from RsvKat k2
where k1.ziBelegNr = k2.ziBelegNr and
(k2.splitdate < k1.splitdate or k2.splitdate is null)

Your original query doesn't make any sense since you group by a field that
you also use an aggregate function upon.