We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 280bf19 commit 9ba875cCopy full SHA for 9ba875c
packages/cubejs-schema-compiler/adapter/MssqlQuery.js
@@ -75,10 +75,17 @@ class MssqlQuery extends BaseQuery {
75
}
76
77
groupByDimensionLimit() {
78
- return this.offset ? ` OFFSET ${parseInt(this.offset, 10)} ROWS` : '';
+ if (this.rowLimit) {
79
+ return this.offset ? ` OFFSET ${parseInt(this.offset, 10)} ROWS FETCH NEXT ${parseInt(this.rowLimit, 10)} ROWS ONLY` : '';
80
+ } else {
81
+ return this.offset ? ` OFFSET ${parseInt(this.offset, 10)} ROWS` : '';
82
+ }
83
84
85
topLimit() {
86
+ if (this.offset) {
87
+ return '';
88
89
return this.rowLimit === null ? '' : ` TOP ${this.rowLimit && parseInt(this.rowLimit, 10) || 10000}`;
90
91
0 commit comments