You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a query where in the ORDER BY clause I have a subquery with an ORDER BY clause, when I limit the query I get an incorrect query with redundant ORDER BY clause
Current behaviour
Input sql
SELECT col1 FROM test ORDER BY ( SELECT col2 from test ORDER BY col2 )
Output sql
SELECT col1 FROM test ORDER BY ( SELECT col2 from test ORDER BY col2 ) ORDER BY (SELECT0) OFFSET 0 ROWS FETCH NEXT 10 ROWS ONLY
How to reproduce
/** @var SQLServerPlatform */$platform;
$querySql = 'SELECT col1 FROM test ORDER BY ( SELECT col2 from test ORDER BY col2 )';
$sql = $platform->modifyLimitQuery($querySql, 10);
Expected behaviour
SELECT col1 FROM test ORDER BY ( SELECT col2 from test ORDER BY col2 ) OFFSET 0 ROWS FETCH NEXT 10 ROWS ONLY
The text was updated successfully, but these errors were encountered:
trusek
added a commit
to trusek/dbal
that referenced
this issue
Nov 17, 2020
Bug Report
Summary
I have a query where in the ORDER BY clause I have a subquery with an ORDER BY clause, when I limit the query I get an incorrect query with redundant ORDER BY clause
Current behaviour
Input sql
Output sql
How to reproduce
Expected behaviour
The text was updated successfully, but these errors were encountered: