To know about the Basics of the CAML query read this article.
Download Link
Use the following link to download the CAML Query builder.
http://www.u2u.be/res/Tools/files/CamlBuilderSetupv4.0.0.0.zip
Update: CAML query builder for 2007, 2010, 2013 and SP Online link
Update: CAML query builder for 2007, 2010, 2013 and SP Online link
How to use CAML Query Builder to create a query
Following are the steps for using the CAML query builder to create a CAML query
1. Open the CAML query builder. Type the URL to connect to the SharePoint site and check Credentials of the current user to login
2. Once clicked connect, you will see the following window SharePoint site with all the lists and libraries in the site in a tree view structure which is shown below:
3. Now we will create a new query on a list named “Product List” as shown below:
4. We will start creating a new query which is as follows:
5. You will find the query being created depending upon your selection from the list
6. Clicking on Execute, you will see the query being executed and the result is being displayed in the result tab as shown below:
The Query created is:
<Query>
<Where>
<Gt>
<FieldRef Name="Quantity" />
<Value Type="Number">0</Value>
</Gt>
</Where>
<OrderBy>
<FieldRef Name="Price" Ascending="True" />
</OrderBy>
</Query>
Hence, CAML Query Builder allows us to create the queries very easily so that it can be used in the SharePoint programming.
Now, we will have a question, how to use this query in the Visual Studio to retrieve the data from a list.
To know how to use CAML query in Visual Studio programming, read this article.