Please sign in to comment.
Fix pagination ordering on calculated columns on SQL Server.
On older versions of SQL Server, the pagination is accomplished using a ROW_NUMBER() OVER clause. Unfortunately, OVER does not support the use of column aliases. But for calculated columns the only practical way to specify their use in ordering is with their alias, this currently causes a SQL error. This fix will substitute the calculation's SQL syntax in place of the column alias before generating the OVER clause for calculated columns, fixing the bug.
- Loading branch information...
Showing with 27 additions and 1 deletion.