Subject | Re: [firebird-support] Select first 3 and last 3 records |
---|---|
Author | Ann W. Harrison |
Post date | 2005-06-10T17:45:57Z |
Cao Ancoinc wrote:
by clause can not be used in a select expression in a UNION. Order by
controls the order of results, not the order of inputs. Since what you
want is non-standard, I'd suggest a non-standard solutions - a stored
procedure.
Regards,
Ann
>Firebird objects because the SQL standard is quite clear that the order
> I need to select the first 3 and last 3 records from a transaction file
> This I would imagine would be a simple query as the example below however
> Firebird objects to the "order by" clause when a "union" operator is present
by clause can not be used in a select expression in a UNION. Order by
controls the order of results, not the order of inputs. Since what you
want is non-standard, I'd suggest a non-standard solutions - a stored
procedure.
Regards,
Ann