Commit 00c38c53 authored by vforchi's avatar vforchi
Browse files

Fixed behaviour of TOP and DISTINCT

parent 1bd1f4e1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -189,7 +189,7 @@ public class SQLServerTranslator extends JDBCTranslator {

		for(int i = 0; i < clause.size(); i++){
			if (i == 0){
				sql = clause.getName() + (clause.hasLimit() ? " TOP " + clause.getLimit() + " " : "") + (clause.distinctColumns() ? " DISTINCT" : "");
				sql = clause.getName() + (clause.distinctColumns() ? " DISTINCT" : "") + (clause.hasLimit() ? " TOP " + clause.getLimit() + " " : "");
			}else
				sql += " " + clause.getSeparator(i);