[Zope] how to skip duplicate zsql results?

Edward Pollard pollej@uleth.ca
Tue, 29 Jul 2003 22:15:31 -0600


I think the easiest solution here would be to incorporate a GROUP BY 
clause into your SQL query.

I don't think it's really correct to consider these "duplicate" items, 
as that implies erroneous representation of the information.

If you are unfamiliar with GROUP BY clauses, a google on the subject 
should be enlightening.

Edward

Wayne Connolly wrote:

>i have a simple zsql (select * from table) which
>returns a list of items.
>
>The problem is that it returns identical items. Ie
>1. item 1
>2. item 1
>3. item 2
>
>How can i make it skip/omit the second duplicate
>entry. Below is the code.
>
><SELECT name="item">
><OPTION tal:repeat="table here/getTableMethod"><SPAN
>tal:replace="table/item">Some Item</SPAN></OPTION>
>        </SELECT>
>
>Thanks,
>Wayne
>
>__________________________________
>Do you Yahoo!?
>Yahoo! SiteBuilder - Free, easy-to-use web site design software
>http://sitebuilder.yahoo.com
>
>_______________________________________________
>Zope maillist  -  Zope@zope.org
>http://mail.zope.org/mailman/listinfo/zope
>**   No cross posts or HTML encoding!  **
>(Related lists - 
> http://mail.zope.org/mailman/listinfo/zope-announce
> http://mail.zope.org/mailman/listinfo/zope-dev )
>