Subject | Re: [firebird-support] fb 1.0 => 1.5 having doesnt work any more |
---|---|
Author | Arno Brinkman |
Post date | 2003-07-08T20:30:49Z |
Hi Richard,
Move your evaluation from the having to the where clause :
SELECT
ZiBelegNr,
Min(SplitDate) as "Splitter-Datum"
FROM
RsvKat
WHERE
SplitDate IS NOT NULL
GROUP BY
ZiBelegNr
Regards,
Arno Brinkman
ABVisie
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Firebird links :
http://www.firebirdsql.com
http://www.firebirdsql.info
http://www.fingerbird.de/
http://www.comunidade-firebird.org/
Nederlandse firebird nieuwsgroep :
news://80.126.130.81
> in Firebird 1.0 we use this and it works fine:Yes, put the comparisions at the place they belong.
>
> Select ZiBelegNr, Min(SplitDate) as "Splitter-Datum" from RsvKat
> group by ZiBelegNr
> having (SPLITDATE is not null)
>
> I want those ZiBelegNr entries that have for the "ZiBelegNr" only
> entries with Splitdate not null.
> e.g.
> ZiBelegNr Splitdate
> 1 08/08/2003
> 1 NULL
> 2 08/08/2003
> 3 NULL
> ZiBelegNr=2 is what i want to get.
>
> But in fb1.5 it doesnt work (error). I need fb 1.5 for windows 2003.
> I tried
> Select ZiBelegNr, Min(SplitDate) as "Splitter-Datum" from RsvKat
> group by ZiBelegNr, splitdate
> having (SPLITDATE is not null)
>
> That SQL works, but i get the wrong result.
>
> Any Idea what to do
Move your evaluation from the having to the where clause :
SELECT
ZiBelegNr,
Min(SplitDate) as "Splitter-Datum"
FROM
RsvKat
WHERE
SplitDate IS NOT NULL
GROUP BY
ZiBelegNr
Regards,
Arno Brinkman
ABVisie
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Firebird links :
http://www.firebirdsql.com
http://www.firebirdsql.info
http://www.fingerbird.de/
http://www.comunidade-firebird.org/
Nederlandse firebird nieuwsgroep :
news://80.126.130.81