协作应用程序标记语言 (CAML)---Query语法示例
1、Or,Lt,Gt,OrderBy
<Query>
<Where>
<Or>
<Lt>
<FieldRef Name="Stock"/>
<Value Type="Number">
15
</Value>
</Lt>
<Gt>
<FieldRef Name="Price"/>
<Value Type="Currency">
20.00
</Value>
</Gt>
</Or>
</Where>
<OrderBy>
<FieldRef Name="Title"/>
</OrderBy>
</Query>
2、Eq
<Query>
<Where>
<Eq>
<FieldRef Name="ID"/>
<Value Type="Integer"><UserID/></Value>
</Eq>
</Where>
</Query>
3、And,Eq,Lt,Neq,And嵌套
<Query>
<Where>
<And>
<Eq>
<FieldRef Name="AssignedTo"/>
<Value Type="Integer">
<UserID/>
</Value>
</Eq>
<And>
<Lt>
<FieldRef Name="DueDate"/>
<Value Type="DateTime">
<Today/>
</Value>
</Lt>
<Neq>
<FieldRef Name="Status"/>
<Value Type="Choice">Completed</Value>
</Neq>
</And>
</And>
</Where>
</Query>