Subject | Re: Order by error in FB 1.5 |
---|---|
Author | jesus_cointec |
Post date | 2006-09-26T07:08:53Z |
And what about date and timestamp error with dialect 1?
Thankds
--- In firebird-support@yahoogroups.com, "Arno Brinkman"
<fbsupport@...> wrote:
Thankds
--- In firebird-support@yahoogroups.com, "Arno Brinkman"
<fbsupport@...> wrote:
>firebird
> Hi,
>
> > I have a database with a lot of stored procs. I have moved from
> > 1.0x to 1.5 and when i try to recompile some stored procs i getthe error
> > Invalid expression in the ORDER BY clause (not contained ineither an
> > aggregate function or the GROUP BY clause)it
>
> > The expression is
>
> > select max(NFIELD)
> > from Table_X
> > where IDTABLEX = :IDTableX
> > order by IDTABLEX, NFIELD
> > into :NField;
>
> > in previous versions i used the order by clause to force index
> > selection, but do i have now to change all the metadata to make
> > compatible with 1.5x.query.
>
> The error is correct, because IDTABLEX isn't a valid field in your
> The ORDER is done after the aggregate-calculation and at thatpoint there can be more IDTABLEX values for NFIELD.
> With other words such a query in FB1.0 could give you wrongresults.
>features:
> Regards,
> Arno Brinkman
> ABVisie
>
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> General database developer support:
> http://www.databasedevelopmentforum.com
>
> Firebird open source database (based on IB-OE) with many SQL-99
> http://www.firebirdsql.org
> http://www.firebirdsql.info
>
> Support list for Interbase and Firebird users:
> firebird-support@yahoogroups.com
>
> Nederlandse firebird nieuwsgroep:
> news://newsgroups.firebirdsql.info
>