May 16, 2019 at 7:18 am
Can RANGE window function take user input as value for interval and ranges instead of unbounded preceding and current row?
May 16, 2019 at 3:19 pm
It's simple enough to test. Have you done so?
Drew
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
May 16, 2019 at 9:28 pm
OVER clause: https://docs.microsoft.com/en-us/sql/t-sql/queries/select-over-clause-transact-sql?view=sql-server-2017
If you mean something like this, you can't do this:
declare @i int = 2;
select sum(a) over (partition by b
order by c
rows between current row and @i following
)
from mytable
May 16, 2019 at 10:21 pm
Can RANGE window function take user input as value for interval and ranges instead of unbounded preceding and current row?
What do you mean by "user input"? What client application are you using?
The absence of evidence is not evidence of absence
- Martin Rees
The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
- Phil Parkin
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply