-
Notifications
You must be signed in to change notification settings - Fork 3
SQL Test Queries GROUP BY
David Lidström edited this page Nov 5, 2017
·
3 revisions
These are the tests and expected results for different GROUP BY queries.
These tests can be found in camlsql.sql_groupby.spec.js
.
NOTE Group By is not supported by the SharePoint REST services. When using it with camlsql exec method the grouping will be done within the camlsql library when the data has been retreived.
However, when providing the <GroupBy>
element in the CAML XML query the OrderBy option will have no effect. For this reason the GroupBy
element will be removed from the XML when you use the camlsql.exec function.
TBD
- "
SELECT * FROM List1 GROUP BY Title
", `[]
<View>
<Query>
<GroupBy>
<FieldRef Name="Title" />
</GroupBy>
</Query>
</View>
When executing using exec method (pass true to getXml method)
- "
SELECT * FROM List1 GROUP BY Title
"
- (Empty result)