Are you joining to another table and if so what are your join criteria. Often the cause of this is multiple hits on records in a child table. Even if you are not selecting fields from that table it is enough to cause the records to repeat.
-----Original Message-----
From: Carel Greaves <mssqldba-ezmlmshield-x25494975.[Email address protected]
To: LazyDBA Discussion <[Email address protected]
Sent: Fri Aug 31 04:38:35 2007
Subject: Select Distinct Values
Just a question
I have a query that selects profile data for members, if I don't do a select
distinct it gives me a lot of correct values, (unique values) of members
i.e. only one record per member, but every now and then I get duplicate
values for one member, multiple times.
Why does this occure?
I know SELECT DISTINCT is there to remove duplicates, but without SELECT
DISTINCT why would this "mistake" happen?
Any help would be greatly appreciated.
Kind Regards
Carel Greaves
---------------------------------------------------------------------
TO REPLY TO EVERYBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
To post a dba job: http://jobs.lazydba.com
To subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html
MS Sql Server LazyDBA home page