Re: SELECT DISTINCT + ORDER BY confusion

2004-07-12 Thread SGreen
| | cc: | | Fax to: | | Subje

RE: SELECT DISTINCT + ORDER BY confusion

2004-07-09 Thread Justin Swanhart
wrote: > Have you tried using a group by clause? Group by > title > > -Original Message- > From: news > To: [EMAIL PROTECTED] > Sent: 7/9/04 3:08 PM > Subject: SELECT DISTINCT + ORDER BY confusion > > I've got a product & story setup where there can

Re: SELECT DISTINCT + ORDER BY confusion

2004-07-09 Thread Jon Drukman
Victor Pendleton wrote: Have you tried using a group by clause? Group by title same problem - the group by happens before the order by and you get essentially random results. -Original Message- From: news To: [EMAIL PROTECTED] Sent: 7/9/04 3:08 PM Subject: SELECT DISTINCT + ORDER BY

RE: SELECT DISTINCT + ORDER BY confusion

2004-07-09 Thread Victor Pendleton
Have you tried using a group by clause? Group by title -Original Message- From: news To: [EMAIL PROTECTED] Sent: 7/9/04 3:08 PM Subject: SELECT DISTINCT + ORDER BY confusion I've got a product & story setup where there can be multiple stories of a given type for any product.

SELECT DISTINCT + ORDER BY confusion

2004-07-09 Thread Jon Drukman
I've got a product & story setup where there can be multiple stories of a given type for any product. I want to find the names of the products with the most-recently-posted stories of a certain type. This query works well: SELECT p.id,p.title FROM product p join e_prod ep on ep.product=p.id j