Re: "select having" problem
Posted in 2000
Andreas Stern wrote:
>
> Jonathan Leffler wrote:
> >
> > "Manuel A. Daponte Santiago" wrote:
> >
> > > Hi everybody !
> > >
> > > This select works fine:
> > >
> > > select ord_id, count(unique ship_num)
> > > from ord_l
> > > where ord_id < 1000
> > > group by ord_id> > >
> > > But when I try to further filter the data with a having clause all I get is
> > > a syntax error
> > >
> > > select ord_id, count(unique ship_num)
> > > from ord_l
> > > where ord_id < 1000
> > > group by ord_id
> > > having count(unique ship_num) > 1> > >
> > > I have Informix Dynamic Server Version 7.31.UC2 on a SCO Release = 3.2v5.0.4
> >
> > Try:
> >
> > HAVING 1 < COUNT(UNIQUE Ship_Num)
> >
> sorry to tell you, that even that gives
>
> # ^
> # 201: A syntax error has occurred.
> #
>
> (SE 7.13 UC1 on an HP 10.01)
I have the _distinct_ impression that COUNT(UNIQUE colname) was
introduced in version 7.20 or some such version. But then my impressions
are usually UNIQUE. :-O
If you can upgrade to the latest version, then it would be advisable,
for many reasons. Year 2000 for one, which should be upon us soon. ;-)
Cheers,
--
Mark.
+----------------------------------------------------------+-----------+
| Mark D. Stock mailto:mdstock@mydas.freeserve.co.uk |//////// /|
| http://www.informix.com http://www.informixhandbook.com |///// / //|
| http://www.iiug.org +-----------------------------------+//// / ///|
| |What year 2000 bug? year 2000 bug? |/// / ////|
| |year 2000 bug? year 2000 bug? year |// / /////|
| |2000 bug? year 2000 bug? year 1900 |/ ////////|
+----------------------+-----------------------------------+-----------+