Hi, I am using MSSQL to fetch the records with max rows defined and distinct as true also for the select clause as following -
*Query q = new Query().from(table).selectDistinct().select(column).setMaxRows(20);* So it is throwing* Incorrect syntax near the keyword 'DISTINCT'* error. I debugged the code and found that in SQLServerQueryRewriter.rewriteSelectClause(), we are appending TOP 20 after the select keyword so with distinct it becomes *select TOP 20 DISTINCT <rest query>* which is not correct. It should be *select DISTINCT TOP 20 <rest query>*. Please provide your input on this. Thanks, Balendra
