Skip to Main Content

[Solved] I used RANGE UNBOUNDED FOLLOWING. But syntax error

Aketi JyuuzouMay 1 2007 — edited Sep 17 2008
http://download-west.oracle.com/docs/cd/B19306_01/server.102/b14200/functions001.htm#CIHCEIGA
RANGE BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING. The short form of this is RANGE UNBOUNDED FOLLOWING
I used RANGE UNBOUNDED FOLLOWING.
But I got syntax error ORA-00905: missing keyword.
Why?
SQL> select version from v$instance;

VERSION
-----------------
10.2.0.1.0

SQL> select Val,
  2  First_Value(case when mod(Val,10) = 0 then Val end ignore nulls)
  3  over(order by Val Range Between Current row and Unbounded Following)
  4  as "aaa"
  5  from (select 10 as Val from dual
  6  union select 15 from dual
  7  union select 20 from dual
  8  union select 25 from dual
  9  union select 30 from dual
 10  union select 32 from dual
 11  union select 34 from dual
 12  union select 40 from dual);

VAL  aaa
---  ---
 10   10
 15   20
 20   20
 25   30
 30   30
 32   40
 34   40
 40   40

SQL> select Val,
  2  First_Value(case when mod(Val,10) = 0 then Val end ignore nulls)
  3  over(order by Val Range Unbounded Following)
  4  as "aaa"
  5  from (select 10 as Val from dual
  6  union select 15 from dual
  7  union select 20 from dual
  8  union select 25 from dual
  9  union select 30 from dual
 10  union select 32 from dual
 11  union select 34 from dual
 12  union select 40 from dual);
over(order by Val Range Unbounded Following)
                                  *
ORA-00905: missing keyword.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked due to inactivity on Sep 18 2007
Added on May 1 2007
10 comments
4,343 views