In case you need to generate the headings dynamically then you can do a Dynamic Pivot as follows:--Creating TableCreate Table Ex(FeatureID int, Value Float )--Inserting Sample Data Insert Into ExSelect 3243241, 4.232Union ALLSelect 3243241, 3.234--Dynamic PivotDeclare @cols Varchar(Max), @sql Varchar(Max)Declare @temp Table(Cols Varchar(10) )Insert Into @temp Select Distinct 'Point' + Cast(ROW_NUMBER() Over (Partition By FeatureId Order By(Select NULL) ) As Varchar(10) ) As rn From ExSelect @cols = Coalesce(@cols + ', ', '') +QUOTENAME(Cols) From @tempSet @sql = 'Select FeatureID, '+@cols+' From (Select *, ''Point'' + Cast(ROW_NUMBER() Over (Partition By FeatureId Order By(Select NULL) ) As Varchar(10) ) As rn From Ex) As a Pivot (Max(Value) For rn In ('+@cols+') ) As Pvt'Execute (@sql)
N 28° 33' 11.93148"E 77° 14' 33.66384"