Commit 7988754c authored by Bill Schaller's avatar Bill Schaller Committed by Steve Müller

Change (?:DISTINCT|) to (?:DISTINCT)?

parent bcc72a56
......@@ -1187,7 +1187,7 @@ class SQLServerPlatform extends AbstractPlatform
// Even if the TOP n is very large, the use of a CTE will
// allow the SQL Server query planner to optimize it so it doesn't
// actually scan the entire range covered by the TOP clause.
$selectPattern = '/^(\s*SELECT\s+(?:DISTINCT|)\s*)(.*)$/i';
$selectPattern = '/^(\s*SELECT\s+(?:DISTINCT)?\s*)(.*)$/i';
$replacePattern = sprintf('$1%s $2', "TOP $end");
$query = preg_replace($selectPattern, $replacePattern, $query);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment