Home Forums SQL Server 2012 SQL Server 2012 - T-SQL Manipulate a field that contains a specific format RE: Manipulate a field that contains a specific format
John Mitchell-245523
SSC Guru
Points: 148809
More actions
March 5, 2018 at 7:39 am
#1981944
Number the rows in the StartPoint CTE using ROW_NUMBER(). Then, instead of using LEAD in the StartPointsandNext CTE, join StartPoint to itself on RowNo = RowNo + 1.
John