Subject | Re: fb 1.0 => 1.5 having doesnt work any more |
---|---|
Author | Richard |
Post date | 2003-07-09T08:04:10Z |
--- In firebird-support@yahoogroups.com, Svein Erling Tysvaer
<svein.erling.tysvaer@k...> wrote:
0090 ms (exists sql). In my case its not bad, because this table is
not so large.
regards Richard
<svein.erling.tysvaer@k...> wrote:
> At 14:37 08.07.2003 +0000, you wrote:field that
> >Select ZiBelegNr, Min(SplitDate) as "Splitter-Datum" from RsvKat
> >group by ZiBelegNr, splitdate
> >having (SPLITDATE is not null)
>
> Try
>
> 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
> you also use an aggregate function upon.Thanks. It works. But it takes a little longer 0050 ms (having sql)
>
> HTH,
> Set
0090 ms (exists sql). In my case its not bad, because this table is
not so large.
regards Richard