惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

酷 壳 – CoolShell
酷 壳 – CoolShell
H
Hacker News: Front Page
P
Palo Alto Networks Blog
T
ThreatConnect
Apple Machine Learning Research
Apple Machine Learning Research
博客园_首页
T
True Tiger Recordings
P
Privacy & Cybersecurity Law Blog
B
Blog
IT之家
IT之家
Last Week in AI
Last Week in AI
F
Full Disclosure
Hacker News: Ask HN
Hacker News: Ask HN
C
Comments on: Blog
Microsoft Azure Blog
Microsoft Azure Blog
C
Cybersecurity and Infrastructure Security Agency CISA
Microsoft Security Blog
Microsoft Security Blog
博客园 - 【当耐特】
N
News and Events Feed by Topic
NISL@THU
NISL@THU
腾讯CDC
雷峰网
雷峰网
Security Latest
Security Latest
李成银的技术随笔
M
Microsoft Research Blog - Microsoft Research
L
LangChain Blog
L
Lohrmann on Cybersecurity
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
C
Check Point Blog
Y
Y Combinator Blog
Recent Announcements
Recent Announcements
博客园 - Franky
N
News | PayPal Newsroom
V
V2EX
A
About on SuperTechFans
The Register - Security
The Register - Security
月光博客
月光博客
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Google Online Security Blog
Google Online Security Blog
MyScale Blog
MyScale Blog
Cisco Talos Blog
Cisco Talos Blog
Vercel News
Vercel News
WordPress大学
WordPress大学
C
Cyber Attacks, Cyber Crime and Cyber Security
The Hacker News
The Hacker News
IntelliJ IDEA : IntelliJ IDEA – the Leading IDE for Professional Development in Java and Kotlin | The JetBrains Blog
IntelliJ IDEA : IntelliJ IDEA – the Leading IDE for Professional Development in Java and Kotlin | The JetBrains Blog
爱范儿
爱范儿
A
Arctic Wolf
L
LINUX DO - 最新话题
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More

博客园 - 疯子峰

oracle性能分析2 oracle性能分析 诡异的socket连接失败 ELK配置watcher 多进程 vs 多线程 关于时间 ELK日志平台 Java web项目 wordpress之客户端发布文章 神舟笔记本安装ubuntu 10.10 安装vs2010 AOP, Aspect-oriented programming 获取淘宝商品描述和价格 - 疯子峰 SPEmailEventReceiver 之导入附件EXCEL - 疯子峰 为incoming mail绑定事件,SPEmailEventReceiver 安装Windows 2003更新后导致moss 无法访问 - 疯子峰 Ubuntu 的启动过程概览 linux 全局配置文件 vim 用户配置
SPQuery查询语法简要说明(转) - 疯子峰 - 博客园
疯子峰 · 2010-01-27 · via 博客园 - 疯子峰

SPQuery查询语句是以XML格式展现出来的,如下面的例子

<Query>
  
<OrderBy>
    
<FieldRef Name="Modified" Ascending="FALSE"></FieldRef>
  
</OrderBy>
  
<Where>
    
<Or>
      
<Neq>
        
<FieldRef Name="Status"></FieldRef>  //字段名
        
<Value Type="Text">Completed</Value> //字段值
      
</Neq>
      
<IsNull>
        
<FieldRef Name="Status"></FieldRef>
      
</IsNull>
    
</Or>
  
</Where>
</Query>

现在我用大家熟悉的SQL语法来和它做个比较

SPQuery SQL <Where></Where> Where <OrderBy></OrderBy> Order By <And></And> And <Or></Or> Or <Eq></Eq>    = <Geq></Geq> >= <Gt></Gt> > <Leq></Leq> <= <Lt></Lt> < <Neq></Neq> !=

注意:
<And>条件只能包含两个以内的相同子元素,也就是说一个<And>最多只能有两个<Eq>子元素,但是<And>可以包含另一个<And>子元素,所以多个<And>查询条件时我们要用<And>分层的方式来写,我现在只用到了AND,所以就了解这个,其它的不知道是不是也是这样。

这些常用的都列在这里了,有一些特殊的还是去看SDK吧
下载地址

Windows Sharepoint Services SDK

转自 

http://www.cnblogs.com/nick-yan/articles/611158.html