Home Forums SQL Server 2008 T-SQL (SS2K8) PERCENTILE FUNCTION equivalent to excel function in SQL 2008 RE: PERCENTILE FUNCTION equivalent to excel function in SQL 2008

  • akash_singh (4/21/2015)


    I am working on sql server 2008, can anyone help me with the logic please 🙂

    I was afraid you were going to say that.

    One of the issues I encountered while attempting to replicate the formula is that I had no documentation describing the calculation. Is that described anywhere in the Excel documentation on line? Send a link if it is.

    One issue with the sample data you provided is that it is too simplistic. What happens if the row count is not 10? That's where it really starts getting convoluted. I was trying to back into a formula, but was unable to do so.


    My mantra: No loops! No CURSORs! No RBAR! Hoo-uh![/I]

    My thought question: Have you ever been told that your query runs too fast?

    My advice:
    INDEXing a poor-performing query is like putting sugar on cat food. Yeah, it probably tastes better but are you sure you want to eat it?
    The path of least resistance can be a slippery slope. Take care that fixing your fixes of fixes doesn't snowball and end up costing you more than fixing the root cause would have in the first place.

    Need to UNPIVOT? Why not CROSS APPLY VALUES instead?[/url]
    Since random numbers are too important to be left to chance, let's generate some![/url]
    Learn to understand recursive CTEs by example.[/url]
    [url url=http://www.sqlservercentral.com/articles/St