vous ne devriez pas utiliser ROW_NUMBER()
,
- utiliser
DENSE_RANK()
à la place - supprimer
PARTITION BY
requête,
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
- Démo SQLFiddle