Re: "select having" problem
Posted in 2000
a_blonde@mindless.com — — source: Informix-list mailing list archive (1991-1998)
---- you 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
You just need to check the number of returned records for each group Dude, so try:
having count(*) > 1
AB
----------------------------------------------------------------
Get your free email from AltaVista at http://altavista.iname.com