Question
- How do I write a T-SQL Stored Procedure that lets me select percentages of rows between X% and Y%?
- So basically I would want to select the rows between 30 PERCENT and 40 PERCENT…..
I know that you can do the following, but obviously that doesn’t let met specify a set of rows between 2 percentages.
SELECT TOP 50 PERCENT * FROM tblAssets
Help greatly appreciated.
Updated Answer
I’ve updated my answer as there were 2 problems with my original answer below
TOPsolutionI got the following values comparing with the nested
TOPsolution.Gives
Gives
Original Answer