MOSS CAML语法-Query写法

CAML语法-Query写法
1.Geq(>=)
  The Geq element is an arithmetic operator that means "greater than or equal to." It can be used within a Where element in a view definition.

 
   
     
       
     

     
       
       
         
       

     

   

  

  
  
 


2.Eq(=)
  The Eq element is an arithmetic operator that means "equal to" and is used within the Query element.

 
   
 

 
   
     
       
        Completed
     

     
       
     

   

 


3.Gt(>)
The Gt element is an arithmetic operator that means "greater than." This element is used similarly to Eq and Lt.

 
   
     
       
     

     
       
       
         
       

     

   

 

 
   
 


4.Lt(<)
The Lt element is an arithmetic operator that means "less than" and is used in queries in views. This element is used similarly to Eq and Gt.

 
   
     
       
     

     
       
       
         
       

     

   

 

 
   
 


5.Neq(!=)
The Neq element is an arithmetic operator that means "not equal to" and is used in queries.

 
   
 

 
   
     
       
        Completed
     

     
       
     

    

  



协作应用程序标记语言 (CAML)---Query语法示例
1、Or,Lt,Gt,OrderBy






15





20.00








2、Eq








3、And,Eq,Lt,Neq,And嵌套


















Completed
























Completed






7.5 下表是CAML查询的一些简单说明:

元素 说明
And 并且
BeginsWith 以某字符串开始的
Contains 包含某字符串
Eq 等于
FieldRef 一个字段的引用 (在GroupBy 中使用)
Geq 大于等于
GroupBy 分组
Gt 大于
IsNotNull 非空
IsNull 空
Leq 小于等于
Lt 小于
Neq 不等于
Now 当前时间
Or 或
OrderBy 排序
Today 今天的日期
TodayIso 今天的日期(ISO格式)
Where Where子句

请使用浏览器的分享功能分享到微信等