for .NET Developers, Cloud Architects, SQL Server Performance Tuning, Devops specialist and Azure DevOps.
Saturday, August 24, 2013
tsql : Split row based on row number , ROW_NUMBER(),RANK(),
select * from (select F=cast((RowNo/100) as int)+1,F1,F2 from ( SELECT ROW_NUMBER() OVER(ORDER BY f2) RowNo,F1,F2 FROM TempTable where F2 IS NOT NULL ) sub1) AS T WHERE T.F=1
No comments:
Post a Comment