2

From the answer to my previous question, I found this Data Explorer query:

StackOverflow Rank and Percentile

I put my user_id (897326) and click Run. I get this error:

Arithmetic overflow error converting bigint to data type numeric.
6
  • As Siva alludes to below these are user-defined queries and not related to Stack Exchange. If you have a problem with a query that you can't fix, consider asking on Stack Overflow (after first checking that there is no duplicate). Commented Nov 4, 2012 at 15:56
  • 1
    @Ben In the original version of the question Neolisk was asking whether MSO was the correct place to ask this, and I edited it out, thinking this might have been an issue with SEDE and not the query itself.
    – yannis
    Commented Nov 4, 2012 at 16:45
  • I've corrected the query. I didn't even know people were using it or that so many people had favorited it. It obviously will fail for any user id > 99999. I guess two years ago that didn't seem like such a big deal (and how many of the higher users would have any significant ranking...).
    – Cade Roux
    Commented Nov 5, 2012 at 0:59
  • @CadeRoux: thanks for the update. It's amazing how good old things are still being used today. Many examples. :)
    – user199936
    Commented Nov 5, 2012 at 1:00
  • @Neolisk It would be good if we got notifications from SEDE about things that need comments.
    – Cade Roux
    Commented Nov 5, 2012 at 1:04
  • @CadeRoux: agree. You can vote on it here: meta.stackexchange.com/questions/52887/….
    – user199936
    Commented Nov 5, 2012 at 1:07

1 Answer 1

4

You can fork the query by clicking fork query link and then change it according to your needs. In this case, I changed the type casting from CAST(Ranking AS decimal(10, 5)) to CAST(Ranking AS decimal(20, 5)) and the query ran fine for your user id.

Link to the updated query:

StackOverflow Rank and Percentile

Note to the original author:

I have left a comment on one of the SO posts by the original author Cade Roux.

5
  • Thanks - now it works. But it does not update the original query. So what about those who starred the original query, or various links to it from different part of SO?
    – user199936
    Commented Nov 4, 2012 at 15:55
  • @Neolisk: I have left a comment about this error on one of the posts by the author.
    – user162697
    Commented Nov 4, 2012 at 15:58
  • Looks like pretty much decentralized, meaning you would have to find an author's post on something and comment on that, even if it's not directly related to the problem.
    – user199936
    Commented Nov 4, 2012 at 16:00
  • @Neolisk You may be interested in this feature request: Notify/contact SEDE user of fix to query
    – Tim Stone
    Commented Nov 4, 2012 at 16:22
  • Thanks, @Tim - I upvoted and posted a related suggestion in there.
    – user199936
    Commented Nov 4, 2012 at 16:31