Subject Re: Proble with GROUP BY in SELECT
Author alfredm80@hotmail.com
Hello:

Thanks you very much for the answer, I try it and it works well.
Can yoy tell me where can i find information abot the specification
of SQL-92, please??.

Best Regards
Carlos

( Soorry about my bad english but i´m spanish )

--- In ib-support@y..., "Ann W. Harrison" <aharrison@i...> wrote:
> At 04:52 PM 6/6/2001 +0000, alfredm80@h... wrote:
>
> >I have problems with the this select-sql statement:
> >
> >select * from dgcb group by numero order by numero;
> >
> >The error is:
> >
> >Dynamic SQL error
> >SQL Error code = - 104
> >Invalid column Reference
> >Statement: select * from dgcb group by numero order by numero
>
> The SQL standard says that in a grouped query, you can select
> only the grouping field(s) or aggregates. If you have any field
> in dgcb other than numero, you must reference it through an
> aggregate expression
>
> select numero, max (name), max (address), max (phone)
>
> from dgcb group by numero order by numero;
>
>
> Regards,
>
> Ann
> www.ibphoenix.com
> We have answers.