Skip to Content
0

Window frame specification of RANGE not allowed for this window function

Feb 01 at 05:40 AM

16

avatar image

Hi Experts,

whenever i'm using RANGE window frame it throws an error like as shown as below:

Error:

Window frame specification of RANGE not allowed for this window function

Code:

SELECT COUNT(*) 
OVER (PARTITION BY "ID" ORDER BY "S_DATE"  
RANGE BETWEEN CURRENT ROW AND 2 FOLLOWING) AS COUNT_VALUE 
FROM "KABIL_PRACTICE"."WINDOW_RANGE";

But if i use Rows instead of Range it works... But i.e., not my need.

Because RANGE is different from ROWS, if I'm not mistaken.

Any suggestion Please...

10 |10000 characters needed characters left characters exceeded

RANGE is not part of the window function syntax. So check the documentation and explain, what you wanna reach.

0

I suggest checking the SQL reference documentation for the window aggregate functions.

Besides that, you might get a better result to your question if you explain what you want to ask the database and not how you tried to put it in SQL.

0
* Please Login or Register to Answer, Follow or Comment.

0 Answers