index on osbalance=0 tag xxx select ... from ... where (osbalance=0) ; or select ... from ... where !(osbalance=0) ; do not use select ... from ... where (osbalance#0) ; && as this does not match the index expression>>>Hi,
>>Index on IIF(osbalance=0,.F.,.T.) tag yourtag && will work, but "overkill" >>Index on osbalance#0 tag yourtag && much shorter and faster>>The same simplifiation can be used in many cases which many programmers clearly are not aware of.
>>lValue=.T. >>?lValue=.T. && Bad code >>?lValue && Good code>>Unfortunately youi can not set order to a binary index, but a binary index will be used to optimize queries.