du bør ikke bruge ROW_NUMBER()
,
- brug
DENSE_RANK()
i stedet - fjern
PARTITION BY
forespørgsel,
SELECT hl.ts_DateTime,
hl.Tagname as [ID],
hl.TagValue as [Value],
DENSE_RANK() OVER (ORDER BY ts_datetime) AS RowFilter
FROM Table1 hl
ORDER BY RowFilter
- SQLFiddle-demo