|
In #bindLimitParametersAtStartOfQuery SQLServer2005LimitHandler wronly assumes that TOP appears before any other parameters. When the native query contains a CTE, this is not necessarily the case. Consider the following query:
with A as (select * from T where C = :my_param) select * from A
Now my_param is assigned the top parameter, and top gets the value for my_param.
|