On Tue, Jan 06, 2004 at 05:11:45PM +0100, Maik Jablonski wrote:
Steve Lenti wrote:
I have a Zcatalog setup to handle bunches of small xml files that are being stored as DTML Documents. When I do a query I would like to make the results unique on a fieldindex that is called ad_num. Is there a way to filter the results of a query to be unique on a fieldindex. I realize I can step through the results and filter out the duplicates but is there a more optimal way of doing this. I tried messing with something like this:
context.Catalog({ 'adTextidx' : adTextidx}).uniqueValuesFor('ad_num')
but this unfortunatly does not work.
Use something like:
context.Catalog.uniqueValuesFor('ad_num')
that really isn't what I'm looking for because I have like 100,000 objects in the catalog. I want to be able to do a 'DISTINCT' on the results from a query on the Catalog. Something simliar to the DISTINCT function in mysql -- Steve Lenti Systems Analyst When angry, count four; when very angry, swear. -- Mark Twain, "Pudd'nhead Wilson's Calendar"