MSSQL support

Fix mssql support for paginate_by_sql