Subject | Re: [firebird-support] fb 1.0 => 1.5 having doesnt work any more |
---|---|
Author | Svein Erling Tysvaer |
Post date | 2003-07-08T15:10:38Z |
At 14:37 08.07.2003 +0000, you wrote:
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.
HTH,
Set
>Select ZiBelegNr, Min(SplitDate) as "Splitter-Datum" from RsvKatTry
>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.
HTH,
Set