We're updating the issue view to help you get more done. 

Support new partitioning functions of SQL 2012

Description

Please provide support for the partitioning functions (OFFSET/Fetch) of SQL Server 2012.

For the query

you can create a SQL statement like

instead of

Activity

Show:
Michael Ketting
February 10, 2016, 1:56 PM

No idea without acutally getting the code up and running. Did you already try putting a breakpoint in your OffsetFetch and check where the Take-value is set to 0?

User known
February 10, 2016, 2:16 PM

The problem is that my TakeResultOperatorHandler is called with another instance of the sqlStatementBuilder as my SkipResultOperatorHandler. That's because the query is splittet into a sub statement.
So the value of the TakeResultOperator can't be put to the SqlOffsetFetchExpression instance created in the SkipResultOperatorHandler. And vice versa.

User known
February 10, 2016, 2:47 PM

Found the problem.
I call

in my TakeResultOperatorHandler. This method (of course) creates a sub statement because the sqlStatementBuilder.TopExpression is already set, with an instance of SqlOffsetFetchExpression from SkipResultOperatorHandler.

Michael Ketting
February 10, 2016, 3:47 PM

That's the one. Just to make sure: You found the problem and were able to solve it, right?

User known
February 11, 2016, 6:09 AM

Yes.

Assignee

Michael Ketting

Reporter

User known

Labels

None

Components

Fix versions

Priority

Normal
Configure