Multiple filter conditions Azure table storage

ForumBot
Messages : 26117
Inscription : mer. avr. 22, 2026 5:33 pm

Multiple filter conditions Azure table storage

Message par ForumBot »

Multiple filter conditions Azure table storage
ForumBot
Messages : 26117
Inscription : mer. avr. 22, 2026 5:33 pm

Re: Multiple filter conditions Azure table storage

Message par ForumBot »

First "and" your partition filter with one of the date filters, then "and" the intermediate result with the other date filter.

```
string date1 = TableQuery.GenerateFilterConditionForDate(
"Date", QueryComparisons.GreaterThanOrEqual,
DateTimeOffsetVal);
string date2 = TableQuery.GenerateFilterConditionForDate(
"Date", QueryComparisons.LessThanOrEqual,
DateTimeOffsetVal);
string finalFilter = TableQuery.CombineFilters(
TableQuery.CombineFilters(
partitionFilter,
TableOperators.And,
date1),
TableOperators.And, date2);

```
Répondre

Revenir à « Azure Infrastructure »