?
Solved

Replicate Excel Quartile Function in Sql Server 2008 R2

Posted on 2011-04-29
2
Medium Priority
?
942 Views
Last Modified: 2012-05-11
Hi, does anyone know if there's a way to replicate Excel's Quartile Function in SQL Server 2008? Thanks.
0
Comment
Question by:Shino_skay
2 Comments
 
LVL 61

Accepted Solution

by:
HainKurt earned 1500 total points
ID: 35494326
maybe you can use nTile(4)

select *, nTile(4) over (order by some_column) qTile
from mytable
0
 

Author Closing Comment

by:Shino_skay
ID: 35701505
there is a long complicated sql replication for the excel's quartile function to be mimiced in sql server
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
Windocks is an independent port of Docker's open source to Windows.   This article introduces the use of SQL Server in containers, with integrated support of SQL Server database cloning.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.
Suggested Courses

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question