Question : Select Distinct with Joined Table Query

I know this is going to be one of those damn obvious ones one I see it, but just can't crack it.

I am doing a select statement joining two tables (query attached).  The nature of the data is resulting in some duplicates being returned.

Basically I want to select where the record is distinct.  I know I can select on given column being distinct, but how do I tell the query to only return distinct 'records'?

Query is being done against a SQL Server DB.

Many Thanks in advance.

Jason
1:
2:
3:
4:
5:
6:
SELECT *
FROM org o, categories_members cm
WHERE o.site_id = 1
and o.status = 1
and o.org_id = cm.org_id
and cm.category_id = 19

Answer : Select Distinct with Joined Table Query

Yeah, you can delete all that... and make sure that you are killing all the cookies as well...  If that does not work, I don't know how to fix that cuz I cannot duplicate it on my machine...

CyanBlue
Random Solutions  
 
programming4us programming4us