You don't have to bother constructing a query with some special syntax; simply add several ranges for the same field:
QueryBuildDataSource inventDimDs = query.dataSourceTable(tableNum(InventDim)); FieldId locationField = fieldNum(InventDim…