Subject | Re: [firebird-support] Simple question |
---|---|
Author | Arno Brinkman |
Post date | 2004-07-27T22:27:48Z |
Hi,
Field2 must also be in a aggregate function or GROUP BY clause.
Comming back to the original question.
An DESC Index on Field1 would help in this case, but how many duplicates are
there (or gona be) on Field1?
Regards,
Arno Brinkman
ABVisie
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Firebird open source database (based on IB-OE) with many SQL-99 features :
http://www.firebirdsql.org
http://www.firebirdsql.info
http://www.fingerbird.de/
http://www.comunidade-firebird.org/
Support list for Interbase and Firebird users :
firebird-support@yahoogroups.com
Nederlandse firebird nieuwsgroep :
news://80.126.130.81
> > Is it possible to optimize this query:That it doesn't work :-D
> >
> > select
> > field2
> > from
> > table
> > where
> > field1 = ( select max(field1) from table )
> what's wrong with
> select max(field1), field2 from table
Field2 must also be in a aggregate function or GROUP BY clause.
Comming back to the original question.
An DESC Index on Field1 would help in this case, but how many duplicates are
there (or gona be) on Field1?
Regards,
Arno Brinkman
ABVisie
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Firebird open source database (based on IB-OE) with many SQL-99 features :
http://www.firebirdsql.org
http://www.firebirdsql.info
http://www.fingerbird.de/
http://www.comunidade-firebird.org/
Support list for Interbase and Firebird users :
firebird-support@yahoogroups.com
Nederlandse firebird nieuwsgroep :
news://80.126.130.81