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?
Quote Reply
Re: [Bernhof] DISTINCT problem... In reply to
SELECT DISTINCT(post_topic), post_subject
FROM tblPost
========================================
Buh Bye!

Cheers,
Me
Quote Reply
Re: [Stealth] DISTINCT problem... In reply to
Hmm.. Same result.

I'm using Microsoft ActiveX Data Objects 2.7 Library in Visual Basic, using the Microsoft Jet OLEDB 4.0 provider with an Access 2003 database. Any suggestions?