January 8, 2020 at 2:36 pm
PasLe Choix wrote:Thanks John,
DENSE_RANK() is an analytical function
No it isn't, it's a Window function.
John already provided a link to analytic functions. Had you followed it, you would have seen that DENSE_RANK() does not appear there.
maybe this is debatable:
This post treats all Ranking Functions as analytical functions.
Thank you anyway.
January 8, 2020 at 2:49 pm
maybe this is debatable:
This post treats all Ranking Functions as analytical functions.
Thank you anyway.
That post is from 2004, it's almost 16 years old and based on SQL Server 2000 Oracle... None of the Analytic functions even existed in 2004; most of them were brought in 8 years later in SQL Server 2012. To put it bluntly, it's wrong (as DENSE_RANK
has never been an analytic function, it's a ranking function) and it's very outdated.
It's not something that can be debated, as it's very (well) documented what is (and therefore isn't) an analytic function.
Thom~
Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
Larnu.uk
January 8, 2020 at 2:53 pm
Thom beat me to it!
microsoft.com vs amis.nl ... I know which source I'm going with.
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
January 8, 2020 at 2:53 pm
That post is from 2004, it's almost 16 years old and based on SQL Server 2000... None of the Analytic functions even existed in 2004; most of them were brought in 8 years later in SQL Server 2012. To put it bluntly, it's wrong (as
DENSE_RANK
has never been an analytic function, it's a ranking function) and it's very outdated.
OK, thank you for indicating that. I left SQL for couple years, not aware of that.
January 8, 2020 at 2:56 pm
Actually I just noticed that post is about PL/SQL and Oracle, not SQL Server. What SQL Server and Oracle call Analytic Functions could be different, as same named functions may not behave the same. So it's not based on an old version of SQL Server; it's not base on SQL Server at all.
Thom~
Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
Larnu.uk
January 8, 2020 at 2:58 pm
Haha, thank you Phil and please don't get panic on me, happy new year
Panic over 🙂 Happy new year to you too.
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
January 8, 2020 at 3:01 pm
Actually I just noticed that post is about PL/SQL and Oracle, not SQL Server. What SQL Server and Oracle call Analytic Functions could be different, as same named functions may not behave the same. So it's not based on an old version of SQL Server; it's not base on SQL Server at all.
Hi Thom, I could definitely do everyone here especially you a free lunch for picking up the needle in a hay, haha, thank you my friend, you have eagle-like sharp eyes.
January 8, 2020 at 6:25 pm
People often confuse the window and analytical functions, which is what I would have asked. Often the code might need to be pre-2012, so using the OVER() with windowing functions isn't required.
I suspect this is some puzzle question to get someone to think without using any analytical functions, which is good for learning, not so good for prod code.
Viewing 9 posts - 16 through 23 (of 23 total)
You must be logged in to reply to this topic. Login to reply