Quick glance of different ranking functions that we can use in SQL Server -
Ranking functions return a ranking value for each row in a partition. Depending on the function that is used, some rows might receive the same value as other rows. Ranking functions are nondeterministic.
SQL Server introduced four different ranking functions to rank the rows in partition or in general -
1 RANK
2 NTILE
3 DENSE_RANK
4 ROW_NUMBER
http://msdn.microsoft.com/en-us/library/ms189798.aspx
Example on different strategies to remove duplicate records in SQL server in a typical ETL OR OLTP type applications -
http://www.mssqltips.com/tip.asp?tip=1952
http://www.mssqltips.com/tip.asp?tip=1918
Thanks - D
No comments:
Post a Comment