cancel
Showing results for 
Search instead for 
Did you mean: 

Window frame specification of RANGE not allowed for this window function

former_member383962
Participant
0 Kudos

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...

pfefferf
Active Contributor
0 Kudos

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

lbreddemann
Active Contributor
0 Kudos

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.

Accepted Solutions (0)

Answers (0)