From a8cd5cfd390456fef02b5edc655dba5c30adcb1b Mon Sep 17 00:00:00 2001 From: Michael Trier Date: Mon, 10 Nov 2008 01:11:40 +0000 Subject: [PATCH] If there's a zero offset with mssql just ignore it. --- lib/sqlalchemy/databases/mssql.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/sqlalchemy/databases/mssql.py b/lib/sqlalchemy/databases/mssql.py index 0909587954..923e85ceab 100644 --- a/lib/sqlalchemy/databases/mssql.py +++ b/lib/sqlalchemy/databases/mssql.py @@ -950,7 +950,7 @@ class MSSQLCompiler(compiler.DefaultCompiler): so tries to wrap it in a subquery with ``row_number()`` criterion. """ - if self.dialect.has_window_funcs and (not getattr(select, '_mssql_visit', None)) and (select._offset is not None): + if self.dialect.has_window_funcs and (not getattr(select, '_mssql_visit', None)) and select._offset: # to use ROW_NUMBER(), an ORDER BY is required. orderby = self.process(select._order_by_clause) if not orderby: -- 2.47.3