NerdyHearn
Home
Blog

Contact
Mailing List

Software

Active Directory Products
Object Compare
Permission Compare

IPhone Products
Calls To Calendar
SMS To CSV
SMS To Gmail
Voicemail To Gmail

Sites
DocuTerminal
How Long For Me
My Music To Me
SaveMySerials
TypeCount

Blog
Twitter

NerdyHearn - Blog


<< 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

Programatically Retrieving an Assembly's PublicKeyToken through a PowerShell CmdLet
Updating an LDAP Property in C#
Reading IPhone Text Messages using C# and SQLite
Using MOSS and WSS SharePoint Workflow to Resize Images in an Image Library
ConnectionString Switcharoo

Comments

Currently no comments.

Add A Comment

Name:


URL:


Email Address: (not public, used to send notifications on further comments)


Comments:



Enter the text above, except for the 1st and last character:


NerdyHearn - Latest tech news relating to C#, ASP.NET, SharePoint, PHP, general development, and more. DocuTerminal - Online Filing Cabinet solution. Scan, search and archive your paper documents. SaveMySerials - Protect yourself from theft, fire, natural disasters and more by recording your serial numbers My Music To Me - Stream your subsonic music collection to your Sonos wireless system TypeCount - Count how often you type across different computers! ServrTrackr - Monitor your SSL certificates, website uptime, and DNS configurations