What is the azure table storage query equivalent of T-sql's LIKE command?

Brian Leeming picture Brian Leeming · Mar 27, 2013 · Viewed 18.2k times · Source

I'm querying Azure table storage using the Azure Storage Explorer. I want to find all messages that contain the given text, like this in T-SQL:

message like '%SysFn%'

Executing the T-SQL gives "An error occurred while processing this request"

What is the equivalent of this query in Azure?

Answer

David Makogon picture David Makogon · Mar 27, 2013

There's no direct equivalent, as there is no wildcard searching. All supported operations are listed here. You'll see eq, gt, ge, lt, le, etc. You could make use of these, perhaps, to look for specific ranges.

Depending on your partitioning scheme, you may be able to select a subset of entities based on specific partition key, and then scan through each entity, examining message to find the specific ones you need (basically a partial partition scan).