SELECT DISTINCT supplier FROM supplier_table ORDER BY supplier -----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Michel Combe Sent: Monday, February 03, 2003 9:32 AM To: Zope@zope.org Subject: [Zope] Newbie needs help Hi, What I want to do is display, from the result of an SQL query, each first occurence of a supplier name . ie : I have a query which returns for example "s1,s1,s1,s2,s2,s3,s3" and I want to display "s1,s2,s3". This is what I wrote : <dtml-let previous="''"> <dtml-in SQL_SelectSupplier> <dtml-if "SupplierName!=previous"> <p>Found First</p> <dtml-else> <p>Found Next</p> <dtml-let previous=SupplierName></dtml-let> </dtml-if> <dtml-in> It doesn't work and I can't find why... Thanks for your help Michel Combe _______________________________________________ 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 )
----- Original Message ----- From: "Schmidt, Allen J." <aschmidt@nvcc.edu> To: "'Michel Combe'" <combe@club-internet.fr>; <Zope@zope.org> Sent: Monday, February 03, 2003 3:37 PM Subject: RE: [Zope] Newbie needs help
SELECT DISTINCT supplier FROM supplier_table ORDER BY supplier
Hi, Allen, I can't use SELECT DISTINCT in this case. I have to filter out the lines on the client. Michel Combe
participants (2)
-
Michel Combe -
Schmidt, Allen J.