Click here to Skip to main content
15,910,009 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have to insert Dense_rank numbers into the datatable or gridview by using c# code and not by SQL.

e.g. In SQL it can be like this,

SQL
select *,DENSE_RANK() over (order by [FinalScore] desc) as rank2 from #Temp


but I have to do it in C# code and not in SQL.
Posted
Updated 3-Feb-14 19:27pm
v2

1 solution

Add a new column to the datatable.
Then run a loop over the datatable and add these values.
 
Share this answer
 
Comments
it.sudhiryadav 4-Feb-14 1:25am    
Dense_rank is not any value. Its auto generated numbers.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900