21 Oct
2005
21 Oct
'05
7:03 p.m.
Etienne Labuschagne wrote at 2005-10-21 13:00 +0200:
Is there a way to search for all the records where one indexed field equals another indexed field?
Equivalent SQL query would be:
SELECT * FROM table WHERE field1 = field2
If the index has only a few different values, enumerating them may be feasible. With "AdvancedQuery", this could look like: from Products.AdvancedQuery import Or, Eq query = Or(*[Eq(I1,v) & Eq(I2,v) for v in I1.unique(Values)]) -- Dieter