@Override
  public void appendLimitOffset(SQLStatement stat, long limit, long offset) {
	  if (offset > 0) {
		  throw new IciqlException("iciql does not support offset for MSSQL dialect!");
	  }
    StringBuilder query = new StringBuilder(stat.getSQL());

    // for databaseVersion >= 2012 need Offset
    if (limit > 0) {
      int indexSelect = query.indexOf("SELECT");

      if (indexSelect >= 0) {
        StringBuilder subPathQuery = new StringBuilder(" TOP ");
        subPathQuery.append(Long.toString(limit));

        query.insert(indexSelect + "SELECT".length(), subPathQuery);

        stat.setSQL(query.toString());
      }
    }
  }