If you’re getting an error that reads “NEXT VALUE FOR function does not support the PARTITION BY clause” in SQL Server, it’s probably because you’re trying to use the PARTITION BY
sub clause in an OVER
clause when using NEXT VALUE FOR
to increment a sequence object.
In other words, the NEXT VALUE FOR
function does not support the PARTITION BY
sub clause of the OVER
clause.
To fix this issue, either remove the PARTITION BY
clause or change the statement to use another method for partitioning the results.