April 12, 2011 at 10:46 am
Hi,
Please help on this. Here is my table
CREATE TABLE #TABLE (SNO INT,AMT NUMERIC(16,2),RANK INT)
INSERT INTO #TABLE(SNO,AMT)
SELECT 1,10000
UNION
SELECT 2,2000
UNION
SELECT 3,4500
UNION
SELECT 4,1000
UNION
SELECT 5,40000
UNION
SELECT 6,500
UNION
SELECT 7,9500
UNION
SELECT 8,1200
Here is the Result needed.
110000.00 1
22000.002
34500.002
41000.002
540000.00 3
6500.004
79500.004
81200.005
The rank should be increased for every sum of 10000 .
Regards
Ram..
🙂
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply