Hi,
this change #300 unfortunately causes errors when the query is using distinct: com.microsoft.sqlserver.jdbc.SQLServerException: ORDER BY items must appear in the select list if SELECT DISTINCT is specified.
Maybe it is better not to try to trick the query parser here:
|
orderBy.add(statement.getBuilder().literal("ROW_NUMBER() OVER (ORDER BY (SELECT null))")); |
...but step out in that case:
super.printSQLSelectStatement(call, printer, statement);
return;
Kai