Friday, February 26, 2010
, and ,! operators in query ranges
If a query range value is "A,B" it will be translated into the SQL expression (ItemId='A') OR (ItemId='B'), so both items with ID A and B will be selected. If a query range is "!A" than it will be translated into SQL expression NOT (ItemId='A'), so items with ID not equal to A will be selected. But, if a query range is "A,!B" it will be translated not into (ItemId='A') OR NOT (ItemId='B') as it seems to be correct. It will be translated into (ItemId='A') AND NOT (ItemId='B'). Despite that such behavior looks strange it seems to be a feature, not a bug. So it is just better to understand "," and ",!" as different operators - OR and AND NOT.
Subscribe to:
Post Comments (Atom)
(ItemId='A') OR NOT (ItemId='B') would select every item, which is not relevant.
ReplyDeleteAnother example 100..102,!101 will select 100 and 102, which is ok!
Yes, that's why I think it is a feature. However it seems to be a little bit strange. May be mostly because the "," operator is not commutative as we used to - "!A, B" is not the same as "B, !A".
ReplyDeletecleveland browns jerseys
ReplyDeletecoach outlet
versace
ray ban sunglasses
jaguars jersey
ugg outlet
nike trainers uk
tennessee titans jersey
coach outlet store
cheap uggs
cheap jordans
ReplyDeletesupreme
moncler
converse outlet store
hermes
kd 12
yeezy shoes
nike shoes
hermes handbags
fitflop