Home
IPhone SMS To Gmail
Consulting
Security Alerts
Blog
Software
Projects
Links
About
Contact
Blog
FriendFeed
Facebook
Flickr
Twitter
Toluu
Last.fm
Picasa
LinkedIn
|
<< Back To All Blogs
Querying Table Entities with Microsoft Azure (And ADO.NET Data Services Framework)
Thursday, November 6th, 2008
I have been doing a lot of work lately with Microsoft Azure and specifically with the Tables in Microsoft Azure. During my work with the tables I was unable to find any up-front, easy to use examples of "queries" for entities in tables (otherwise known as filters by Azure terms). Here are some common rules which are important to know followed by some very basic examples of queries.
Most important: strings are enclosed in single quotes.
Sub-queries (aka sub-filters) are enclosed in single parenthesis ( and ).
Sub-queries are and'd and or'd outside and between parenthesis.
Comparisons are used as short-handed English-variant operators, such as ge for Greater then or equal to (>=), ne for Not equal to (!= or <>), and so on.
Without further ado, here are some examples:
Rows where the firstname column is equal to "tom":
$filter=(firstname eq 'tom')
Rows where the firstname column is not equal to "tom":
$filter=(firstname ne 'tom')
Rows where the counter column is greater then 5:
$filter=(counter gt 5)
Rows where the counter column is greater then 5 and less then 15:
$filter=(counter gt 5)and(counter lt 15)
Rows where the counter is greater then 20 or less then 10:
$filter=(counter gt 20)or(counter lt 10)
The same query syntax should also be useable with ADO.NET Data Services Framework although I have not confirmed this as of yet.
$filter=(blog eq 'Tom Out')
Tags
CSharp
Related Blogs
Reading Digital Signatures from InfoPath Forms in MOSS 2007 and WSS 3.0 Workflow
Enumerating all attributes of an element and adding them to a dictionary using LINQ with Lambda Expressions
Creating High Quality Images with C# and GDI
Enumerating the values of an enum in C#
Comments
Currently no comments.
Add A Comment
Name:
URL:
Email Address: (not public, used to send notifications on further comments)
Comments:
Please enter the text from the image:

|