Subject | Re: [firebird-support] Skip records |
---|---|
Author | Mark Rotteveel |
Post date | 2014-07-29T17:31:22Z |
On 29-7-2014 09:47, Svein Erling Tysvær
svein.erling.tysvaer@... [firebird-support] wrote:
`SELECT` columnlist. The `ROW_NUMBER` is applied over the materialized
rows, so you can't apply it in the filtering condition. You need a
subquery or CTE with `ROW_NUMBER()` and then filter that in the outer
select.
Mark
--
Mark Rotteveel
svein.erling.tysvaer@... [firebird-support] wrote:
> Don't know whether windowing functions can be used in the WHERE clause, but when Firebird 3 is released, it would be tempting to try things likeYou shouldn't be able to use window functions in a `WHERE`, only in the
>
> WHERE MOD(ROW_NUMBER() OVER (ORDER BY <something>), 5) = 2
`SELECT` columnlist. The `ROW_NUMBER` is applied over the materialized
rows, so you can't apply it in the filtering condition. You need a
subquery or CTE with `ROW_NUMBER()` and then filter that in the outer
select.
Mark
--
Mark Rotteveel