Quantcast
Channel: dBforums – Everything on Databases, Design, Developers and Administrators
Viewing all articles
Browse latest Browse all 13329

DISTINCT not working

$
0
0
I have a table 'advice' which contains various fields including:
clientid, clientname, adviceid and date

I want to get a list out which has everybody who has received advice in it but which only lists the person once no matter how many times they have visited.

I have tried

SELECT DISTINCT clientid, clientname, adviceid FROM advice ORDER BY clientid ASC

but this doesn't remove duplicates from the list.

What am I do wrong?

Many thanks

Viewing all articles
Browse latest Browse all 13329

Trending Articles