Gossamer Forum
Home : General : Databases and SQL :

DISTINCT problem...

Quote Reply
DISTINCT problem...
In the following statement I would like to recieve only one row per post_topic value using the DISTINCT keyword, but I would also like to be able to retrieve the contents of a field named post_subject in each of these rows, but post_subject should not be included in the DISTINCT clause..

SELECT DISTINCT post_topic, post_subject FROM tblPost

How do I do this?
Subject Author Views Date
Thread DISTINCT problem... Bernhof 5534 Nov 21, 2003, 5:23 PM
Thread Re: [Bernhof] DISTINCT problem...
Stealth 5344 Nov 21, 2003, 7:52 PM
Post Re: [Stealth] DISTINCT problem...
Bernhof 5292 Nov 22, 2003, 6:09 AM